Open oligamiq opened 3 days ago
Regarding your request for serde support, I plan to implement this feature within the next week.
To address your concern about saving old logs, you can currently add another layer to the registry to write logs simultaneously to a file or another destination such as a central logging server.
First, add the following dependency to your Cargo.toml
:
tracing-subscriber = { version = "*", features = ["fmt"] }
Then, in your Rust code:
let collector = egui_tracing::EventCollector::default();
let debug_file = std::fs::OpenOptions::new()
.append(true)
.create(true)
.open("log-debug.log")
.unwrap();
let debug_file_layer = tracing_subscriber::fmt::layer()
.with_ansi(false)
.with_writer(debug_file);
tracing_subscriber::registry()
.with(collector.clone())
.with(debug_file_layer)
.init();
Errors flood the system. I would like to save old logs to opfs, etc., so it would be great if you could add a serde function.