log-viewer
log-viewer copied to clipboard
json/jsonl log format support
Hello,
is it possible to view *.jsonl files? The idea of config file:
format = {
type: JsonFormat
charset: UTF-8
fields: [
{ name: "date", type: "date" },
{ name: "log.level", type: "level/log4j" },
{ name: "server.ip", type: "message" },
{ name: "message", type: "message" },
]
}
Thank you.
Fanda
An example:
{"@timestamp":"2021-09-06T07:51:35.894+02:00","message":" 60aa634568a31c4442f2feb29779752e SELECT ID FROM logins WHERE LOGIN = 'xy'","log":{"level":"debug"},"server":{"ip":"172.23.0.2"},"http":{"request":{"method":"POST"}},"trace":{"id":"no-session-lZK"},"user":{"id":-1}}
{"@timestamp":"2021-09-06T07:51:35.894+02:00","message":" 60aa634568a31c4442f2feb29779752e SELECT ID FROM logins WHERE LOGIN = 'xy'","log":{"level":"debug"},"server":{"ip":"172.23.0.2"},"http":{"request":{"method":"POST"}},"trace":{"id":"no-session-lZK"},"user":{"id":-1}}
{"@timestamp":"2021-09-06T07:51:35.894+02:00","message":" 60aa634568a31c4442f2feb29779752e SELECT ID FROM logins WHERE LOGIN = 'xy'","log":{"level":"debug"},"server":{"ip":"172.23.0.2"},"http":{"request":{"method":"POST"}},"trace":{"id":"no-session-lZK"},"user":{"id":-1}}
It's impossible now, but I'll implement it sometimes.
I would like this feature - or perhaps someway to feed in our own node/js formatter as middleware - such as pino-pretty: https://github.com/pinojs/pino-pretty#options would be awesome - not sure the lift that would take