Skip to content

Commit

Permalink
fix(log)!: Dont re-export env_filter
Browse files Browse the repository at this point in the history
This lets us shrink our public API
  • Loading branch information
epage committed Jan 19, 2024
1 parent 841eba4 commit e6e2b63
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 65 deletions.
59 changes: 0 additions & 59 deletions examples/custom_logger.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@

mod logger;

#[doc(inline)]
pub use ::env_filter as filter;
pub mod fmt;

pub use self::fmt::{Target, TimestampPrecision, WriteStyle};
Expand Down
6 changes: 2 additions & 4 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use std::{borrow::Cow, cell::RefCell, env, io};

use log::{LevelFilter, Log, Metadata, Record, SetLoggerError};

use crate::filter;
use crate::filter::Filter;
use crate::fmt;
use crate::fmt::writer::{self, Writer};
use crate::fmt::{FormatFn, Formatter};
Expand Down Expand Up @@ -38,7 +36,7 @@ pub const DEFAULT_WRITE_STYLE_ENV: &str = "RUST_LOG_STYLE";
/// ```
#[derive(Default)]
pub struct Builder {
filter: filter::Builder,
filter: env_filter::Builder,
writer: writer::Builder,
format: fmt::Builder,
built: bool,
Expand Down Expand Up @@ -532,7 +530,7 @@ impl std::fmt::Debug for Builder {
/// [`Builder`]: struct.Builder.html
pub struct Logger {
writer: Writer,
filter: Filter,
filter: env_filter::Filter,
format: FormatFn,
}

Expand Down

0 comments on commit e6e2b63

Please sign in to comment.