Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Aug 1, 2024
1 parent 2d91b2a commit 69d65ca
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/json_stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use logforth::SimpleJsonLayout;
use logforth::StdoutAppend;

fn main() {
let append = StdoutAppend::new().with_layout(SimpleJsonLayout);
let append = StdoutAppend::default().with_layout(SimpleJsonLayout);
let append = DispatchAppend::new(append).filter(LogLevelFilter::new(LevelFilter::Trace));
Logger::new().add_append(append).apply().unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples/no_color_stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use logforth::Logger;
use logforth::StdoutAppend;

fn main() {
let append = StdoutAppend::new();
let append = StdoutAppend::default();
let append = DispatchAppend::new(append).filter(LogLevelFilter::new(LevelFilter::Trace));
Logger::new().add_append(append).apply().unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use logforth::SimpleTextLayout;
use logforth::StdoutAppend;

fn main() {
let append = StdoutAppend::new().with_layout(SimpleTextLayout::default());
let append = StdoutAppend::default().with_layout(SimpleTextLayout::default());
let append = DispatchAppend::new(append).filter(LogLevelFilter::new(LevelFilter::Trace));
Logger::new().add_append(append).apply().unwrap();

Expand Down
3 changes: 3 additions & 0 deletions src/append/file/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Rolling File Appender

This appender is a fork of [tracing-appender](https://crates.io/crates/tracing-appender), with significant simplifications to fit this crate's needs.
6 changes: 6 additions & 0 deletions src/append/file/rolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ pub struct RollingFileWriterBuilder {
max_files: Option<usize>,
}

impl Default for RollingFileWriterBuilder {
fn default() -> Self {
Self::new()
}
}

impl RollingFileWriterBuilder {
#[must_use]
pub const fn new() -> Self {
Expand Down

0 comments on commit 69d65ca

Please sign in to comment.