Use logger
[?]
Oct 27, 2018, 2:40 PM
YGC7ZD7NZPCDVETCIBKKTLJPEFLBMQYBIJRDAOHIF762JDMZLUTACDependencies
- [2]
AVBHYHOAStop xmpp thread by shudown - [3]
6DSWVNSYLaunch single-thread executor on own thread - [4]
FVVPKFTLInitial commit - [5]
HKSQO7JZEnable hyper http server and configuration
Change contents
- edit in src/main.rs at line 1
#![deny(missing_docs)] - edit in src/main.rs at line 2
//! XMPP client service - edit in src/main.rs at line 4
#[macro_use]extern crate log;extern crate env_logger; - edit in src/main.rs at line 17
use tokio::runtime::current_thread; - edit in src/main.rs at line 22
mod xmpp;use xmpp::xmpp_process; - edit in src/main.rs at line 27
env_logger::init(); - replacement in src/main.rs at line 49
.map_err(|_| ()).map_err(|e| error!("Cann't get CTRL+C signal: {}", e.0)) - replacement in src/main.rs at line 55
.map_err(|e| eprintln!("server error: {}", e));let mut rt = Runtime::new().expect("Cann't start tokio");.map_err(|e| error!("server error: {}", e)); - replacement in src/main.rs at line 57[3.177]→[3.177:205](∅→∅),[3.205]→[2.315:396](∅→∅),[2.396]→[3.281:379](∅→∅),[3.281]→[3.281:379](∅→∅),[3.379]→[2.397:461](∅→∅),[2.461]→[3.440:680](∅→∅),[3.440]→[3.440:680](∅→∅)
rt.spawn(http_server);let xmpp_join = std::thread::spawn(move || -> Result<(), tokio::io::Error> {// Launch single-threaded runtimelet mut ctrt = current_thread::Runtime::new()?;ctrt.block_on(xmpp_process(ctrl_c.clone().map(|_| ())))});println!("Server started");rt.shutdown_on_idle().wait().expect("Shutdown error");println!("Server stopper");xmpp_join.join().expect("Join xmpp thread").expect("Result xmpp thread");hyper::rt::run(http_server); - edit in Cargo.toml at line 16
log = "0.4"env_logger = "0.5" - edit in Cargo.lock at line 1
name = "aho-corasick"version = "0.6.8"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",][[package]] - edit in Cargo.lock at line 269
][[package]]name = "env_logger"version = "0.5.13"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)","humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)","log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)","regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)","termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 427
[[package]]name = "humantime"version = "1.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",] - edit in Cargo.lock at line 923
][[package]]name = "regex"version = "1.0.5"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)","memchr 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)","regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)","thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)","utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 938
name = "regex-syntax"version = "0.6.2"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",][[package]] - edit in Cargo.lock at line 1046
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 1048
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 1259
][[package]]name = "termcolor"version = "1.0.4"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 1285
][[package]]name = "thread_local"version = "0.3.6"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - edit in Cargo.lock at line 1574
name = "ucd-util"version = "0.1.1"source = "registry+https://github.com/rust-lang/crates.io-index"[[package]] - edit in Cargo.lock at line 1630
name = "utf8-ranges"version = "1.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"[[package]] - edit in Cargo.lock at line 1691
source = "registry+https://github.com/rust-lang/crates.io-index"[[package]]name = "winapi-util"version = "0.1.1" - edit in Cargo.lock at line 1697
dependencies = ["winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",] - edit in Cargo.lock at line 1705
[[package]]name = "wincolor"version = "1.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"dependencies = ["winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)","winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",] - edit in Cargo.lock at line 1769
"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" - edit in Cargo.lock at line 1802
"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" - edit in Cargo.lock at line 1821
"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" - edit in Cargo.lock at line 1879
"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341""checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" - edit in Cargo.lock at line 1917
"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" - edit in Cargo.lock at line 1920
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" - edit in Cargo.lock at line 1943
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" - edit in Cargo.lock at line 1952
"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" - edit in Cargo.lock at line 1963
"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" - edit in Cargo.lock at line 1965
"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba"