diff --git a/internal/logparser/_golden/genericjson_zap_02.json b/internal/logparser/_golden/genericjson_zap_02.json new file mode 100644 index 00000000..08618ea6 --- /dev/null +++ b/internal/logparser/_golden/genericjson_zap_02.json @@ -0,0 +1,11 @@ +{ + "severity": { + "str": "Info", + "number": 9, + "text": "info" + }, + "body": "BadTimestamp", + "attrs": { + "ts": "\"" + } +} \ No newline at end of file diff --git a/internal/logparser/_golden/genericjson_zap_03.json b/internal/logparser/_golden/genericjson_zap_03.json new file mode 100644 index 00000000..8dfb8092 --- /dev/null +++ b/internal/logparser/_golden/genericjson_zap_03.json @@ -0,0 +1,11 @@ +{ + "severity": { + "str": "Info", + "number": 9, + "text": "info" + }, + "body": "BadTimestamp", + "attrs": { + "ts": "-" + } +} \ No newline at end of file diff --git a/internal/logparser/_testdata/genericjson/zap.jsonl b/internal/logparser/_testdata/genericjson/zap.jsonl index caccf76c..a5f92572 100644 --- a/internal/logparser/_testdata/genericjson/zap.jsonl +++ b/internal/logparser/_testdata/genericjson/zap.jsonl @@ -1 +1,3 @@ -{"level":"info","ts":1701681119.1613183,"logger":"poll","caller":"gh-archived/main.go:197","msg":"Events","duration":0.437301455,"integers":[1, 2, 3],"new_count":100,"remaining":1040,"used":3960,"reset":660.838704106,"reset_human":"in 12 minutes","sleep":0.198120375,"target_rate":0.63542183} \ No newline at end of file +{"level":"info","ts":1701681119.1613183,"logger":"poll","caller":"gh-archived/main.go:197","msg":"Events","duration":0.437301455,"integers":[1, 2, 3],"new_count":100,"remaining":1040,"used":3960,"reset":660.838704106,"reset_human":"in 12 minutes","sleep":0.198120375,"target_rate":0.63542183} +{"level":"info","ts":"\"","msg":"BadTimestamp"} +{"level":"info","ts":"-","msg":"BadTimestamp"}