examples: Use logger in chat example. (#678)

This commit is contained in:
Toralf Wittner 2018-11-23 14:18:30 +01:00 committed by GitHub
parent aa86f6824d
commit 826a290bf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,7 @@
//! Dialing any of the other peers will propagate the new participant to all
//! chat members and everyone will receive all messages.
extern crate env_logger;
extern crate futures;
extern crate libp2p;
extern crate tokio;
@ -54,6 +55,7 @@ use libp2p::{
};
fn main() {
env_logger::init();
// Create a random PeerId
let local_key = secio::SecioKeyPair::ed25519_generated().unwrap();
let local_peer_id = local_key.to_peer_id();