Skip to content

Instantly share code, notes, and snippets.

@rosado
Created July 29, 2024 15:49
Show Gist options
  • Save rosado/2371524cf480d64ad219c3309b65e24a to your computer and use it in GitHub Desktop.
Save rosado/2371524cf480d64ad219c3309b65e24a to your computer and use it in GitHub Desktop.
lnav format for lpa project
{
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
"lpa_log": {
"title": "LPA Data Validator Combined Log",
"file-pattern": "combined.log",
"multiline": false,
"json": true,
"timestamp-field": "timestamp",
"level-field": "level",
"body-field": "message",
"value": {
"error": {
"kind": "json"
},
"sessionId": {
"kind": "string",
"identifier": true
},
"message": {
"kind": "string"
},
"method": {
"kind": "string",
"hidden": false,
"identifier": true
},
"endpoint": {
"kind": "string"
},
"type": {
"kind": "string",
"hidden": false,
"identifier": true
},
"service": {
"kind": "string",
"hidden": true
}
},
"line-format": [
{
"field": "__level__",
"text-transform": "uppercase"
},
" [",
{
"field": "__timestamp__"
},
"] ",
{
"field": "type"
},
"",
{
"field": "method",
"prefix": "(",
"suffix": ")",
"default-value": ""
},
" ",
{
"field": "message",
"default-value": ""
},
{
"field": "endpoint",
"default-value": "",
"prefix": " → "
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment