2024-06-26 15:38:25 +02:00
|
|
|
use std::any::Any;
|
|
|
|
|
|
|
|
use libpt::log;
|
|
|
|
use log::{debug, error, info, trace, warn};
|
|
|
|
|
|
|
|
fn main() -> anyhow::Result<()> {
|
|
|
|
let logger = log::Logger::builder()
|
|
|
|
.show_time(false)
|
|
|
|
.max_level(log::Level::TRACE)
|
|
|
|
.build()?;
|
|
|
|
warn!("logger is now enabled");
|
|
|
|
info!("logger was initialized");
|
|
|
|
debug!("logger: {logger:#?}");
|
|
|
|
trace!("Type id of libpt::log::Logger is '{:#?}'", logger.type_id());
|
|
|
|
let u = 19;
|
2024-06-26 15:40:49 +02:00
|
|
|
error!(some_value = u, "No error, this is just a test");
|
2024-06-26 15:38:25 +02:00
|
|
|
Ok(())
|
|
|
|
}
|