Closed denisvmedia closed 10 months ago
Hi, it is a good idea.
Config (by priority):
$PWD/.json-log-config.json
$HOME/.json-log-config.json
And make the format a little more customizable (ref
is a slice and kind
for colorizing and for additional processing):
{
"fields": [
{
"title": "Time",
"ref": [".time", ".ts"],
"kind": "time"
},
{
"title": "Level",
"ref": [".level"],
"kind": "level"
},
{
"title": "Custom Field",
"ref": [".meta.customField"],
"kind": "any"
},
{
"title": "Message",
"ref": [".msg", ".err", ".error"],
"kind": "message"
}
]
}
Yeah, I like it. Just maybe not sure how multiple values of ref
are meant to be processed.
P.S. I'd maybe rename the config to just .jlv.json
for simplicity. I feel your tool has a potential and deserves a good short name :)
@denisvmedia
This feature should be available in json-log-viewer@v0.1.8.
Details: https://github.com/hedhyw/json-log-viewer#customization
Currently we can see Time/Level/Message. Do you think we can make it customizable? The default config would be as follows:
Custom config:
WDYT?
P.S. I really like your viewer. It's simple, but so much usable in my case.