mirror of
https://github.com/tstack/lnav.git
synced 2024-08-17 08:50:41 +03:00
[formats] add vpostgres_log definition
This commit is contained in:
parent
12c2718a16
commit
92b7145971
@ -42,5 +42,6 @@ FORMAT_FILES = \
|
||||
$(srcdir)/%reldir%/vmw_log.json \
|
||||
$(srcdir)/%reldir%/vmw_vc_svc_log.json \
|
||||
$(srcdir)/%reldir%/vmw_py_log.json \
|
||||
$(srcdir)/%reldir%/vpostgres_log.json \
|
||||
$(srcdir)/%reldir%/xmlrpc_log.json \
|
||||
$()
|
||||
|
50
src/formats/vpostgres_log.json
Normal file
50
src/formats/vpostgres_log.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
|
||||
"vpostgres_log": {
|
||||
"description": "Format for vpostgresql log files with format '%m %c %x %d %u %r %p %l'",
|
||||
"url": [
|
||||
"https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-LINE-PREFIX"
|
||||
],
|
||||
"regex": {
|
||||
"std": {
|
||||
"pattern": "(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3} \\S+) (?<session_id>[^ ]*) (?<transaction_id>[^ ]*) (?<db_name>[^ ]*) (?<user>[^ ]*) (?<remote_pair>[^ ]*) (?<pid>[^ ]+) (?<num_line>\\d+)(?<level>[^:]+):\\s+(?<body>.*)"
|
||||
}
|
||||
},
|
||||
"opid-field": "session_id",
|
||||
"value": {
|
||||
"db_name": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"pid": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"remote_pair": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"session_id": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"transaction_id": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"user": {
|
||||
"kind": "string",
|
||||
"identifier": true
|
||||
},
|
||||
"num_line": {
|
||||
"kind": "integer",
|
||||
"foreign-key": true
|
||||
}
|
||||
},
|
||||
"sample": [
|
||||
{
|
||||
"line": "2023-07-25 02:14:09.790 UTC 64bf2ff1.21fc1e 0 VCDB vumuser [local] 2227230 5LOG: disconnection: session time: 0:00:00.012 user=vumuser database=VCDB host=[local]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user