mirror of
https://github.com/gechandesu/structlog.git
synced 2026-01-23 16:04:14 +03:00
18 lines
280 B
V
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()
|
|
}
|