diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cocoa_bridge.rs | 6 | ||||
| -rw-r--r-- | src/lib.rs | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index 5c7c40d..189d504 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -8,6 +8,7 @@ use autopilot::key::type_string; // use cocoa::base::nil; // use cocoa::foundation::{NSArray, NSAutoreleasePool, NSDictionary}; use libc::{c_char, size_t}; +use stderrlog; use xdg; use {HeadphoneButton, MapGroup, MapKind}; @@ -102,6 +103,11 @@ pub struct State { } #[no_mangle] +pub extern "C" fn logger_init() { + stderrlog::new().module(module_path!()).init().unwrap(); +} + +#[no_mangle] pub extern "C" fn state_new() -> *mut State { Box::into_raw(Box::new(State::default())) } @@ -7,6 +7,7 @@ extern crate libc; #[macro_use] extern crate log; +extern crate stderrlog; extern crate xdg; mod cocoa_bridge; |
