1 Commits

Author SHA1 Message Date
ge
f688b3cad5 cleanup, use struct update syntax 2026-01-11 08:57:56 +03:00
2 changed files with 4 additions and 7 deletions

View File

@@ -4,7 +4,6 @@ import structlog
fn main() {
// Initialize logger with edited timestamp.
log := structlog.new(
// timestamp_format: .unix
timestamp: structlog.Timestamp{
format: .unix
}

View File

@@ -96,9 +96,8 @@ pub fn (r Record) append(field ...Field) Record {
mut fields_orig := unsafe { r.fields }
fields_orig << field
return Record{
channel: r.channel
level: r.level
fields: &fields_orig
...r
fields: &fields_orig
}
}
@@ -110,9 +109,8 @@ pub fn (r Record) prepend(field ...Field) Record {
mut new_fields := unsafe { field }
new_fields << r.fields
return Record{
channel: r.channel
level: r.level
fields: new_fields
...r
fields: new_fields
}
}