Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Added env logging, Fixes #199
Browse files Browse the repository at this point in the history
  • Loading branch information
Timidger committed Jan 7, 2017
1 parent 906b650 commit c08fb60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ pub fn init_logs() {
info!("Logger initialized, setting wlc handlers.");
}

fn log_environment() {
for (key, value) in env::vars() {
debug!("{}: {}", key, value);
}
}

/// Handler for signals
extern "C" fn sig_handle(_: nix::libc::c_int) {
rustwlc::terminate();
Expand Down Expand Up @@ -159,6 +165,7 @@ fn main() {
unsafe {signal::sigaction(signal::SIGINT, &sig_action).unwrap() };

init_logs();
log_environment();
detect_proprietary();
// This prepares wlc, doesn't run main loop until run_wlc is called
let run_wlc = rustwlc::init2().expect("Unable to initialize wlc!");
Expand Down

0 comments on commit c08fb60

Please sign in to comment.