pub trait LogSource {
// Required method
fn log_category(&self) -> &'static str;
// Provided methods
fn log_instance(&self) -> Option<&str> { ... }
fn log_category_override(&self) -> Option<&str> { ... }
}Expand description
Required Methods§
Sourcefn log_category(&self) -> &'static str
fn log_category(&self) -> &'static str
The element type’s category, e.g. "opusenc", the filtering key.
Provided Methods§
Sourcefn log_instance(&self) -> Option<&str>
fn log_instance(&self) -> Option<&str>
The element instance name, e.g. "opusenc0", for the log line. Default
none (filtering is by category regardless).
Sourcefn log_category_override(&self) -> Option<&str>
fn log_category_override(&self) -> Option<&str>
A per-instance category override (M845), replacing the type category for
both filtering and output, so G2G_DEBUG=my-cat:debug (and globs) key
off the override. Default none: the type name is the category. An
element stores one in a LogName and returns it here.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".