mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-30 11:11:21 +00:00
examples: Use logger in chat example. (#678)
This commit is contained in:
parent
aa86f6824d
commit
826a290bf1
@ -40,6 +40,7 @@
|
|||||||
//! Dialing any of the other peers will propagate the new participant to all
|
//! Dialing any of the other peers will propagate the new participant to all
|
||||||
//! chat members and everyone will receive all messages.
|
//! chat members and everyone will receive all messages.
|
||||||
|
|
||||||
|
extern crate env_logger;
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
extern crate libp2p;
|
extern crate libp2p;
|
||||||
extern crate tokio;
|
extern crate tokio;
|
||||||
@ -54,6 +55,7 @@ use libp2p::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
env_logger::init();
|
||||||
// Create a random PeerId
|
// Create a random PeerId
|
||||||
let local_key = secio::SecioKeyPair::ed25519_generated().unwrap();
|
let local_key = secio::SecioKeyPair::ed25519_generated().unwrap();
|
||||||
let local_peer_id = local_key.to_peer_id();
|
let local_peer_id = local_key.to_peer_id();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user