diff --git a/examples/unix_timestamp.v b/examples/unix_timestamp.v index 5a4fef2..a93f31e 100644 --- a/examples/unix_timestamp.v +++ b/examples/unix_timestamp.v @@ -4,7 +4,6 @@ import structlog fn main() { // Initialize logger with edited timestamp. log := structlog.new( - // timestamp_format: .unix timestamp: structlog.Timestamp{ format: .unix } diff --git a/structlog.v b/structlog.v index 12c28a9..283ba8c 100644 --- a/structlog.v +++ b/structlog.v @@ -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 } }