xmpp-rs/Cargo.toml 🔗
@@ -20,6 +20,9 @@ futures = "0.3"
tokio = "0.2"
log = "0.4"
+[dev-dependencies]
+env_logger = "0.7"
+
[features]
default = ["avatars"]
avatars = []
Maxime “pep” Buquet created
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
xmpp-rs/Cargo.toml | 3 +++
xmpp-rs/examples/hello_bot.rs | 3 +++
2 files changed, 6 insertions(+)
@@ -20,6 +20,9 @@ futures = "0.3"
tokio = "0.2"
log = "0.4"
+[dev-dependencies]
+env_logger = "0.7"
+
[features]
default = ["avatars"]
avatars = []
@@ -4,12 +4,15 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+use env_logger;
use std::env::args;
use xmpp::{ClientBuilder, ClientFeature, ClientType, Event};
use xmpp_parsers::{message::MessageType, Jid};
#[tokio::main]
async fn main() -> Result<(), Option<()>> {
+ env_logger::init();
+
let args: Vec<String> = args().collect();
if args.len() != 3 {
println!("Usage: {} <jid> <password>", args[0]);