-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
27 changed files
with
274 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
use log::LevelFilter; | ||
use fast_log::appender::FastLogFormat; | ||
use fast_log::config::Config; | ||
use log::LevelFilter; | ||
|
||
fn main() { | ||
fast_log::init(Config::new() | ||
.format(FastLogFormat::new().set_display_line_level(LevelFilter::Trace) | ||
).console()).unwrap(); | ||
fast_log::init( | ||
Config::new() | ||
.format(FastLogFormat::new().set_display_line_level(LevelFilter::Trace)) | ||
.console(), | ||
) | ||
.unwrap(); | ||
log::info!("Commencing yak shaving{}", 0); | ||
log::logger().flush(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
use fast_log::config::Config; | ||
use fast_log::consts::LogSize; | ||
use fast_log::plugin::file_split::RollingType; | ||
use fast_log::plugin::packer::{LogPacker}; | ||
use fast_log::config::Config; | ||
use fast_log::plugin::packer::LogPacker; | ||
|
||
fn main(){ | ||
fast_log::init(Config::new() | ||
.console() | ||
.file_split("target/logs/", | ||
LogSize::MB(1), | ||
RollingType::All, | ||
LogPacker{})).unwrap(); | ||
fn main() { | ||
fast_log::init(Config::new().console().file_split( | ||
"target/logs/", | ||
LogSize::MB(1), | ||
RollingType::All, | ||
LogPacker {}, | ||
)) | ||
.unwrap(); | ||
for _ in 0..20000 { | ||
log::info!("Commencing yak shaving"); | ||
} | ||
log::logger().flush(); | ||
println!("you can see log files in path: {}","target/logs/") | ||
} | ||
println!("you can see log files in path: {}", "target/logs/") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
use fast_log::config::Config; | ||
use fast_log::consts::LogSize; | ||
use fast_log::plugin::file_split::RollingType; | ||
use fast_log::config::Config; | ||
use fast_log::plugin::packer::GZipPacker; | ||
|
||
fn main(){ | ||
fast_log::init(Config::new() | ||
.console() | ||
.file_split("target/logs/", | ||
LogSize::KB(50), | ||
RollingType::KeepNum(5), | ||
GZipPacker{})).unwrap(); | ||
fn main() { | ||
fast_log::init(Config::new().console().file_split( | ||
"target/logs/", | ||
LogSize::KB(50), | ||
RollingType::KeepNum(5), | ||
GZipPacker {}, | ||
)) | ||
.unwrap(); | ||
for _ in 0..20000 { | ||
log::info!("Commencing yak shaving"); | ||
} | ||
log::logger().flush(); | ||
println!("you can see log files in path: {}","target/logs/") | ||
} | ||
println!("you can see log files in path: {}", "target/logs/") | ||
} |
Oops, something went wrong.