veecle_osal_std/log.rs
1//! Logging related system utilities.
2
3use std::io::Write;
4
5pub use veecle_osal_api::log::LogTarget;
6
7/// Implements the [`LogTarget`] trait by printing to standard output.
8#[derive(Debug)]
9pub struct Log;
10
11impl LogTarget for Log {
12 type Time = crate::time::Time;
13
14 fn init() {
15 // noöp
16 }
17
18 /// Prints to [`std::io::stdout`].
19 fn println(args: core::fmt::Arguments<'_>) {
20 // this is a logger, ignore any errors writing
21 let _ = std::writeln!(std::io::stdout(), "{args}");
22 }
23}