mirror of https://github.com/tstack/lnav
[log_format] support for a separate sub-second field
parent
e135cf3334
commit
9eb734ef7e
@ -0,0 +1,2 @@
|
||||
2022-09-24T00:00:09.484 Hello, World!
|
||||
2022-09-24T00:00:19.222 Goodbye, World!
|
@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
|
||||
"subsec_json_log": {
|
||||
"title": "JSON Log with subsecond field",
|
||||
"json": true,
|
||||
"file-pattern": "logfile_json_subsec\\.json",
|
||||
"line-format": [
|
||||
{
|
||||
"field": "__timestamp__"
|
||||
},
|
||||
" ",
|
||||
{
|
||||
"field": "msg"
|
||||
}
|
||||
],
|
||||
"timestamp-field": "instant/epochSecond",
|
||||
"subsecond-field": "instant/nanoOfSecond",
|
||||
"subsecond-units": "nano",
|
||||
"body-field": "msg",
|
||||
"value": {
|
||||
"instant": {
|
||||
"kind": "json",
|
||||
"hidden": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
{"instant":{"epochSecond": 1663977609,"nanoOfSecond": 484000000}, "msg": "Hello, World!"}
|
||||
{"instant":{"epochSecond": 1663977619,"nanoOfSecond": 222000000}, "msg": "Goodbye, World!"}
|
Loading…
Reference in New Issue