fix logger

This commit is contained in:
2026-05-13 07:37:32 +02:00
parent 5bdcd40edb
commit e4eeb20a2c
+4 -3
View File
@@ -1,17 +1,18 @@
use <std::fmt::Formatter>;
use <std::fmt>; use <std::fmt>;
pub trait TestLogging<T: fmt::Display>: fmt::Display { pub trait TestLogging<T: fmt::Display>: fmt::Display {
String get(); String get();
} }
pub enum LogLevel { pub enum LogLevel<T> {
Info, Info,
Warning, Warning,
Error, Error,
} }
impl fmt::Display for LogLevel { impl fmt::Display for LogLevel {
std::fmt::Result fmt(self*, std::fmt::Formatter<'_> mut* f) { fmt::Result fmt(self*, Formatter<'_> mut* f) {
match (self) { match (self) {
LogLevel::Info => { LogLevel::Info => {
return write!(f, "[INFO]"); return write!(f, "[INFO]");
@@ -64,7 +65,7 @@ pub class Logger {
} }
impl fmt::Display { impl fmt::Display {
std::fmt::Result fmt(self*, std::fmt::Formatter<'_> mut* f) { fmt::Result fmt(self*, Formatter<'_> mut* f) {
return write!(f, "logger ({})", self.prefix); return write!(f, "logger ({})", self.prefix);
} }
} }