use env_logger
This commit is contained in:
parent
927e7ba4a7
commit
b8c1e3989a
40
Cargo.lock
generated
40
Cargo.lock
generated
@ -5,6 +5,7 @@ name = "adduser"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
|
"env_logger",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"regex",
|
"regex",
|
||||||
@ -20,6 +21,17 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "atty"
|
||||||
|
version = "0.2.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi",
|
||||||
|
"libc",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "autocfg"
|
name = "autocfg"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
@ -45,6 +57,34 @@ dependencies = [
|
|||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "env_logger"
|
||||||
|
version = "0.8.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "54532e3223c5af90a6a757c90b5c5521564b07e5e7a958681bcd2afad421cdcd"
|
||||||
|
dependencies = [
|
||||||
|
"atty",
|
||||||
|
"humantime",
|
||||||
|
"log",
|
||||||
|
"regex",
|
||||||
|
"termcolor",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hermit-abi"
|
||||||
|
version = "0.1.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "humantime"
|
||||||
|
version = "2.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
|
@ -12,3 +12,4 @@ lazy_static = "1.4"
|
|||||||
log = "0.4"
|
log = "0.4"
|
||||||
simplelog = "0.8"
|
simplelog = "0.8"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
env_logger = "0.8"
|
@ -1,12 +1,10 @@
|
|||||||
extern crate adduser;
|
extern crate adduser;
|
||||||
|
|
||||||
|
extern crate env_logger;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
simplelog::CombinedLogger::init(vec![simplelog::TermLogger::new(
|
env_logger::init();
|
||||||
simplelog::LevelFilter::Warn,
|
|
||||||
simplelog::Config::default(),
|
|
||||||
simplelog::TerminalMode::Mixed,
|
|
||||||
)])
|
|
||||||
.unwrap();
|
|
||||||
use adduser::api::UserDBWrite;
|
use adduser::api::UserDBWrite;
|
||||||
|
|
||||||
let mut db = adduser::UserDBLocal::load_files(adduser::Files::default());
|
let mut db = adduser::UserDBLocal::load_files(adduser::Files::default());
|
||||||
|
Loading…
Reference in New Issue
Block a user