diff options
Diffstat (limited to 'mumd/src/notify.rs')
| -rw-r--r-- | mumd/src/notify.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mumd/src/notify.rs b/mumd/src/notify.rs index 66a0faf..e52b909 100644 --- a/mumd/src/notify.rs +++ b/mumd/src/notify.rs @@ -1,6 +1,10 @@ +use log::*; + pub fn init() { #[cfg(feature = "notifications")] - libnotify::init("mumd").unwrap(); //TODO handle panic (don't send notifications) + if libnotify::init("mumd").is_err() { + warn!("Unable to initialize notifications"); + } } #[cfg(feature = "notifications")] @@ -8,7 +12,7 @@ pub fn send(msg: String) -> Option<bool> { match libnotify::Notification::new("mumd", Some(msg.as_str()), None).show() { Ok(_) => Some(true), Err(_) => { - log::debug!("Unable to send notification"); + warn!("Unable to send notification"); Some(false) } } |
