https://github.com/RegenJacob/egui_logger
a log implementation for egui
https://github.com/RegenJacob/egui_logger
egui game-development gui log logging rust
Last synced: 12 months ago
JSON representation
a log implementation for egui
- Host: GitHub
- URL: https://github.com/RegenJacob/egui_logger
- Owner: RegenJacob
- License: mit
- Created: 2022-10-24T03:36:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T16:46:01.000Z (12 months ago)
- Last Synced: 2025-03-31T17:46:43.106Z (12 months ago)
- Topics: egui, game-development, gui, log, logging, rust
- Language: Rust
- Homepage:
- Size: 342 KB
- Stars: 48
- Watchers: 2
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-egui - egui_logger
README
[](https://crates.io/crates/egui_logger)
[](https://docs.rs/egui_logger/latest/egui_logger/)
# egui_logger
This library implements [`log`](https://crates.io/crates/log) logging support into [`egui`](https://crates.io/crates/egui) applications.
There is also advanced search via regex.
## Demo

## Example
### initilazing:
```rust
fn main() {
// Should be called very early in the program.
egui_logger::builder().init().unwrap();
}
```
### inside your ui logic:
```rust
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](https://crates.io/crates/egui_tracing) primarily for the [tracing](https://crates.io/crates/tracing) create, but also supports log.
## Contribution
Feel free to open issues and pull requests.