Expand description
§egui_logger
This library implements a UI for displaying log messages in egui applications.
There are also various ways to filter the logging output within the UI, such as a regex search through the messages.
§Demo

§Features
puffincompatibility with the puffin crate.
§Example
§Initializing:
fn main() {
// Should be called very early in the program.
egui_logger::builder().init().unwrap();
}§Inside your UI logic:
fn ui(ctx: &egui::Context) {
egui::Window::new("Log").show(ctx, |ui| {
// draws the logger ui.
egui_logger::logger_ui().show(ui);
});
}§Alternatives
- egui_tracing primarily for the tracing crate, but also supports log.
§Contribution
Feel free to open issues and pull requests.
Structs§
- Builder
- The builder for the logger.
You can use
builder()to get an instance of this. - Egui
Logger - The logger for egui.
- Logger
Ui - The Ui for the Logger.
You can use
logger_ui()to get a default instance of the LoggerUi.
Functions§
- builder
- This returns the Log builder with default values.
This is just a convenient way to get
Builder::default(). Read more - clear_
logs - Clears all existing retained logs.
- logger_
ui - Returns a default LoggerUi.
You have to call
LoggerUi::show()to display the logger.