Files
herolib/lib/core/logger/model.v
2025-10-12 12:30:19 +03:00

26 lines
527 B
V

module logger
import incubaid.herolib.data.ourtime
import incubaid.herolib.core.pathlib
@[heap]
pub struct Logger {
pub mut:
path pathlib.Path
lastlog_time i64 // to see in log format, every second we put a time down, we need to know if we are in a new second (logs can come in much faster)
console_output bool // whether to also output to console/stdout
}
pub struct LogItem {
pub mut:
timestamp ourtime.OurTime
cat string
log string
logtype LogType
}
pub enum LogType {
stdout
error
}