Enable multivalue keys
Change config file to accept multivalue keys.
For example:
{
"time": "2021-01-01"
}
or
{
"ts": "2021-01-01"
}
will be readable if .prettylog.yml is set with:
timestamp:
key: time, ts
This is my first pull request for hacktoberfest!
Thanks for your interest in contributing! :)
What was the rationale behind this change? Prettylog was designed to operate on the output of a single app, and I don't really see how a single field (e.g.: timestamp) would be printed with different names.
I'd appreciate if you could elaborate on how you think this change would be useful.
Thanks for your interest in contributing! :)
What was the rationale behind this change? Prettylog was designed to operate on the output of a single app, and I don't really see how a single field (e.g.:
timestamp) would be printed with different names.I'd appreciate if you could elaborate on how you think this change would be useful.
First things first, sorry for late reply.
At the time of this change, I was testing with three different output logs, before normalize it into one format.
So I did propose this change to make sense with that reality where I have a "default" configuration file for prettylog with my common field names, without need to think about timestamp or ts.
Thank you @mbenford !!
Sorry for the very late response!
I guess I understand what you meant (multiple apps with different log formats). The way to go about it is to have a custom .prettylog.yml file in the app's folder. prettylog looks for a config file in the current directory, then one directory above and finally in the $HOME folder.
Happy Birthday, btw! 🎂