Files
structlog/examples/unix_timestamp.v
2026-01-03 16:38:28 +03:00

18 lines
280 B
V

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