Expand description
§egui_logger
This library implements log
logging support into egui
applications.
There is also advanced search via regex.
§Demo
§Example
§initilazing:
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 create, 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
You might want to use
builder()
instead. To get a builder with default values. - 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 conveniend way to get call
Builder::default()
. Read more - init
Deprecated - Initializes the global logger. Should be called very early in the program. Defaults to max level Debug.
- init_
with_ max_ level Deprecated - Same as
init()
accepts alog::LevelFilter
to set the max level useTrace
with caution - logger_
ui - Returns a default LoggerUi.
You have to call
LoggerUi::show()
to display the logger