bd595851e2
251 files: init, acpid, ipcd, netcfg, ihdgd, virtio-gpud, scheme-utils, inputd, block driver, ptyd, ramfs, randd, initfs bootstrap, path deps, version +rb0.3.1, author attribution
18 lines
495 B
Rust
18 lines
495 B
Rust
use redox_log::{OutputBuilder, RedoxLogger};
|
|
|
|
pub fn init_logger(process_name: &str) {
|
|
if let Err(_) = RedoxLogger::new()
|
|
.with_output(
|
|
OutputBuilder::stdout()
|
|
.with_ansi_escape_codes()
|
|
.flush_on_newline(true)
|
|
.with_filter(log::LevelFilter::Trace)
|
|
.build(),
|
|
)
|
|
.with_process_name(process_name.into())
|
|
.enable()
|
|
{
|
|
eprintln!("{process_name}: Failed to init logger")
|
|
}
|
|
}
|