diff options
author | Stuart Stock <stuart@int08h.com> | 2018-02-24 22:36:08 -0600 |
---|---|---|
committer | Stuart Stock <stuart@int08h.com> | 2018-02-24 22:40:14 -0600 |
commit | ca97effa01f977ae775e8f8249421b9fc6d64e72 (patch) | |
tree | d315ab8663b4f89feac240fa2ef48917c8aea19f /src/bin | |
parent | ae47aa86ed2157325c70a8a9582aecd3857bc15d (diff) | |
download | roughenough-ca97effa01f977ae775e8f8249421b9fc6d64e72.zip |
Use simple_logger instead of fern
Fern's configurability and features are overkill. As a bonus, compile
time and binary size both shrink a bit.
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/server.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/bin/server.rs b/src/bin/server.rs index 3244306..6bd2ad1 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -46,11 +46,11 @@ extern crate ring; extern crate roughenough; extern crate time; extern crate untrusted; -extern crate fern; extern crate ctrlc; extern crate yaml_rust; #[macro_use] extern crate log; +extern crate simple_logger; extern crate mio; use std::env; @@ -213,19 +213,6 @@ fn nonce_from_request(buf: &[u8], num_bytes: usize) -> Result<&[u8], Error> { } } -fn init_logging() { - fern::Dispatch::new() - .format(|out, message, record| { - out.finish( - format_args!("{} [{}] {}", time::now().rfc3339(), record.level(), message) - ) - }) - .level(log::LogLevelFilter::Info) - .chain(std::io::stdout()) - .apply() - .unwrap(); -} - fn load_config(config_file: &str) -> (SocketAddr, Vec<u8>) { let mut infile = File::open(config_file) .expect("failed to open config file"); @@ -326,7 +313,7 @@ fn polling_loop(addr: &SocketAddr, mut ephemeral_key: &mut Signer, cert_bytes: & } fn main() { - init_logging(); + simple_logger::init().unwrap(); info!("Roughenough server v{} starting", SERVER_VERSION); |