feat: Multiple configurations
RayPS opened this issue · comments
If I understand correctly, only a single configuration file can be stored in $PWD or $HOME currently.
The only way to maintain and use different configurations is to store them separately in different directory and switch them by changing PWD. Not to mention having a different configuration in the same directory.
I hope there is an option to let us specify the path of configuration file and always having the higher priority than $PWD and $HOME. So in concept:
jlv access-log.json --conf view2.jlv.jsonc
Or maybe having a different configuration in a single file? In case of not breaking current format:
{
fields: [], // default
another_fields: [],
different_fields: [],
more_fields: [],
blahblah: []
}
Hello, thanks for the feature request!
It's a good idea with a config flag!
jlv -c custom_config.json app.log
jlv --config custom_config.json app.log
We can pass it to
json-log-viewer/cmd/jlv/main.go
Line 41 in d1b9829