Replies: 1 comment 1 reply
-
No, you don't need to have env_logger in your application if you don't want to. It just provides a quick and easy way to diagnose problems with the examples, by outputting the logs generated by egui (and eframe, winit, wgpu etc) to stderr, which you can then pipe to a file and attach to an issue or discussion you need help with, e.g.,
This will create a file called If you want to provide the same functionality for the users of your application, you can just use the env_logger crate exactly like the examples do. Otherwise, you can use one of the other loggers listed in the log crate, or something like egui_logger, which displays the logs in the UI, or you can write your own logger that does what you need. The log crate explains how, and it's pretty simple. I made one in this project that is somewhat similar to egui_logger, but I customized it to suit the format I wanted. Or if you don't care about logs, you can just not have any logger, and the application won't log anything. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I am a new learner of egui (and also Rust!).
Since I did not know IMGUI before, I am amazed with the simplicity of egui and find it very fun to write!
I am following the official examples to learn it right now.
And I saw that their dependencies always has the env_logger on list and have its default features off.
I am curious if these two are requirements to use egui (or eframe if I am not correct)?
Beta Was this translation helpful? Give feedback.
All reactions