-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom naming for default fields #4
Comments
The challenge with this, is that many functions currently depend on those field names being the defaults, as well as those function's arguments. Depending on your deployment scenario, though, you don't need to add new fields; you can just replace the fields, e.g. even at a native level with
Obviously not as robust when you want to write to a stream connection, but that's a quick fix for when using it the default way. Adding to enhancements list regardless. |
We stream logs to stdout of the container, and container log streams are piped to a logstash instance, so would be really nice not to have to munge things after the fact. Thanks for adding this to the enhancements list. |
Update that I'm still not super sure about this one, but will explore as I work on v2.0.0. Maybe just add a function arg to rename before output. It would put a lot of onus on the developer to maintain naming consistency, though, and there's a fine line between flexibility and shared-responsibility. But, will keep open for now. |
Removing from v.2.0.0 milestone (but keeping open for others) due to complexity, and use-case dependence. The solution provided earlier is the best bet for now, despite it creating extra redundant keys:
|
In order to allow for conformance to a corporate logging standard, it would be helpful to allow renaming the default log fields in a configuration block of some sort.
For example, Usually, I need to write
log_lvl
with the keylevel
andlog_msg
with the keymsg
. While I can do that now by adding those keys at the end, it seems I'll I end up having extra keys I don't use.The text was updated successfully, but these errors were encountered: