Commit e51044d1 authored by Heinz N. Gies's avatar Heinz N. Gies

Remove terminal logging for BSD

parent 7a2a016a
......@@ -11,7 +11,6 @@ dependencies = [
"slog-async 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-bunyan 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-scope 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-term 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
......@@ -116,16 +115,6 @@ name = "dtoa"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "isatty"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.24 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itoa"
version = "0.3.1"
......@@ -321,18 +310,6 @@ dependencies = [
"slog 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "slog-term"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"chrono 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"isatty 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "strsim"
version = "0.6.0"
......@@ -361,15 +338,6 @@ name = "take_mut"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "term"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term_size"
version = "0.3.0"
......@@ -492,7 +460,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum clippy_lints 0.0.140 (registry+https://github.com/rust-lang/crates.io-index)" = "116a24807a7704264f3bfcfcdc23a6d5196c2b37483281aa70c8e08c23a1b7d3"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum isatty 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fa500db770a99afe2a0f2229be2a3d09c7ed9d7e4e8440bf71253141994e240f"
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
......@@ -519,12 +486,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum slog-bunyan 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c77676c4db1c9688c4bb4fb55a86f5ef247c8d6b58dcb5b14251b466664274ea"
"checksum slog-json 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bea62d7197b99e7142a821b1cef7bd958108b48cf76a030087383643885b65e1"
"checksum slog-scope 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3b719bbab7e785c9bc2790be278822e7e8d60fbe4592954774b7b41449f7524c"
"checksum slog-term 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e98b9b40c26b62acbc114bc24feb3eb080dc6c8bc78461935474ded369a3a2ee"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum take_mut 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7986ceb18a0d75e1fcb8b27c0119389bbe05f016e5a6e54d003251acc1122108"
"checksum term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d168af3930b369cfe245132550579d47dfd873d69470755a19c2c6568dbbd989"
"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
"checksum thread-id 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df7875b676fddfadffd96deea3b1124e5ede707d4884248931077518cf1f773"
"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
......
......@@ -11,7 +11,7 @@ uuid = { version = "0.5", features = ["serde", "v4"] }
toml = "0.4"
clippy = { version = "*", optional = true }
slog = "2"
slog-term = "2"
#slog-term = "2"
slog-async = "2"
slog-scope = "2"
slog-bunyan = "2"
......
......@@ -23,7 +23,7 @@ use uuid::Uuid;
#[macro_use]
extern crate slog;
extern crate slog_term;
// extern crate slog_term;
extern crate slog_async;
#[macro_use]
extern crate slog_scope;
......@@ -105,15 +105,15 @@ fn run() -> i32 {
let mut help_app = App::from_yaml(yaml).version(crate_version!());
let matches = App::from_yaml(yaml).version(crate_version!()).get_matches();
/// console logger
let decorator = slog_term::TermDecorator::new().build();
let term_drain = slog_term::FullFormat::new(decorator).build().fuse();
let level = matches.occurrences_of("verbose");
let term_drain = RuntimeLevelFilter {
drain: term_drain,
level: level,
}.fuse();
let term_drain = slog_async::Async::new(term_drain).build().fuse();
// /// console logger
// let decorator = slog_term::TermDecorator::new().build();
// let term_drain = slog_term::FullFormat::new(decorator).build().fuse();
// let level = matches.occurrences_of("verbose");
// let term_drain = RuntimeLevelFilter {
// drain: term_drain,
// level: level,
// }.fuse();
// let term_drain = slog_async::Async::new(term_drain).build().fuse();
/// fiel logger
let log_path = "/var/log/vmadm.log";
......@@ -129,7 +129,8 @@ fn run() -> i32 {
//let file_drain = slog_term::FullFormat::new(decorator).build().fuse();
let file_drain = slog_async::Async::new(file_drain).build().fuse();
let drain = slog::Duplicate::new(file_drain, term_drain).fuse();
// let drain = slog::Duplicate::new(file_drain, term_drain).fuse();
let drain = file_drain;
let root = slog::Logger::root(
drain,
o!("req_id" => Uuid::new_v4().hyphenated().to_string()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment