Files
structlog/examples/unix_timestamp.v
2026-01-11 08:57:56 +03:00

20 lines
302 B
V

import os
import structlog
fn main() {
// Initialize logger with edited timestamp.
log := structlog.new(
timestamp: structlog.Timestamp{
format: .unix
}
handler: structlog.JSONHandler{
writer: os.stdout()
}
)
defer {
log.close()
}
log.info().message('Hello, World!').send()
}