Struct godot_logger::Builder [−][src]
pub struct Builder { /* fields omitted */ }Expand description
A Builder that configures and initializes the Godot logger
godot-logger implements the builder pattern as the primary interface to configure and
initialize the logger. The configuration has sensible defaults that can be overwritten by
calling the corresponding setters on the Builder struct. Once the configuration is done, the
logger can be initialized by calling the build method.
Examples
use log::Level;
use godot_logger::GodotLogger;
GodotLogger::builder()
.default_log_level(Level::Debug)
.init();Implementations
Sets the default log level
GodotLogger matches all log records against a default log level. By default, only warnings
and errors are logged.
Examples
use log::Level;
use godot_logger::GodotLogger;
let mut builder = GodotLogger::builder();
builder = builder.default_log_level(Level::Debug);Adds a filter
Filters override the default log level for specific Rust modules.
Examples
use godot_logger::GodotLogger;
use log::LevelFilter;
GodotLogger::builder().add_filter("godot_logger", LevelFilter::Off);Initializes the logger
This method consumes the builder and initializes the logger with the current configuration of the builder. After calling this method, log records will be written to Godot’s output console.
Examples
use log::Level;
use godot_logger::GodotLogger;
GodotLogger::builder().init();Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl UnwindSafe for Builder
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
Compare self to key and return true if they are equal.