Skip to content

Expose Logger (Dispatch pipeline) and rethink the builder API #113

@tisonkun

Description

@tisonkun

pub fn try_apply(self) -> Result<(), log::SetLoggerError> {
let logger = Logger::new(self.dispatches);
log::set_boxed_logger(Box::new(logger))?;
log::set_max_level(self.max_level);
Ok(())
}

Since rust-lang/log#664 introduce a logger param for log macros, perhaps we can see how to expose the configured logger (dispatcher pipeline).

So far, our builder is an inflight config for setting up the global logger, and the max_level option is meaningless for a standalone logger.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions