Struct artifact::logger::Logger [] [src]

pub struct Logger { /* fields omitted */ }

A logger within the Artifact logging library. This struct is somewhat similar to an address. The struct itself only stores the name of the logger. However, the initialization functions tell the backend what kind of logger it is, what level it logs at, and other interesting information.

Methods

impl Logger
[src]

Sets the default formatter. This formatter will be used by any logger which does not have a formatter set for it.

Creates a Logger instance, but does not tell the backend to initialize the logger.

Accesses the Artifact library's internal logger. This can be redirected or reformatted to cause the internal logger to log however you need. By default, the internal logger logs to stdout.

Creates a logger which will log to the given output. This tells the backend logger task to initialize the logger.

Creates a logger for the given output which logs messages at or above the given level. This also initializes the logger by telling the backend task.

Redirects a logger to a new output location. Returns the logger as well

Redirects a logger and changes its level Returns the logger

Prevents use of a logger name, and kills off any existing logger instances with that name

Prevents use of a logger name, kills off any existing loggers with that name, and disables logging info about that logger entirely.

Sets the default logger to be this logger.

Sets the default logger to be this logger, silently. This means that all logs to an unknown logger will be directed to this logger. However, no addition to the message will be made by this logger.

Sets the logger's format

Creates a new log message. This just sends a message across the backend channel to the actual logger task.

Trait Implementations

impl Debug for Logger
[src]

Formats the value using the given formatter.

impl Clone for Logger
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Logger
[src]

impl PartialEq for Logger
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.