From c9323b38de8f43eee7c23cbfedc775a706aa9b64 Mon Sep 17 00:00:00 2001 From: xmppftw Date: Tue, 4 Jun 2024 19:19:35 +0200 Subject: [PATCH] Add logging --- Cargo.toml | 2 ++ src/main.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 1a9add8..47ce6a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,5 @@ sha1 = "0.10.6" tokio = { version = "1", features = [ "rt" ] } xmpp = { git = "https://gitlab.com/xmpp-rs/xmpp-rs" } async-channel = "2.3.1" +pretty_env_logger = "0.5" +log = "0.4" diff --git a/src/main.rs b/src/main.rs index b532a10..fa8c30d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ // along with this program. If not, see . use adw::prelude::*; +use adw::subclass::prelude::ObjectSubclassIsExt; use gtk::{gio, glib}; mod message; @@ -41,6 +42,8 @@ fn xep_0392(input: &str) -> String { } fn main() { + pretty_env_logger::init(); + let mut args = std::env::args(); let _ = args.next().unwrap(); let username = args.next().expect("Please give username argument 1");