pub trait Logger:
Send
+ Sync
+ 'static {
// Required method
fn log(&self, level: Level, scope: &str, message: &str);
}Expand description
Callback type for logging.
When installed, internal library log messages are delivered through this callback instead of being discarded. The embedder is responsible for formatting and routing log output.
When the log is unscoped (default scope), scope has zero length.
The callback must be safe to call from any thread.
See set_logger for more details.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Logger for LogStderr
impl<L: Log + 'static> Logger for L
Available on crate feature
log only.Adapt a log implementation to be used by libghostty.
libghostty log scopes are translated directly to log’s metadata
target, and log implementation can choose to filter specific
libghostty logs to be emitted.