Need to add custom fields in json log settings? #13145
-
Is your feature request related to a problem? Please describe.Is there a way to add custom fields in the Json logger, currently these are the fields available. I would like to add fields like hostname, system-id, timezone, etc. Describe the solution you'd likeA setting like log.console.formatter.field which should be configurable , value of it can be recognized by rabbitmq and user should be able to pass info into that. ex: log.console.formatter.field = host Json field mapper can be used to map it. log.console.formatter.json.field_map = 'level:level time:time msg:log host:$HOSTNAME' HOSTNAME can be env variable or a script which should get info from system. Describe alternatives you've consideredNo response Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@manoj365study please never again use issues for questions. Discussions have been around for several years now. JSON Field Mapping documents every JSON logging feature RabbitMQ supports. There are no plans to add anything on top of that, so if that's not enough, you will have to use JSON transformation tools of your own. |
Beta Was this translation helpful? Give feedback.
-
RabbitMQ is open source software. You are welcome to add them and contribute or build your own distribution and run it. We won't support such custom distributions but the source code and the license allow you to scratch your own itch. I do not recall anyone else asking for hostname, time zone, and arbitrary environment variables to be made available to JSON logging, so this cannot possibly become a priority for our small team. |
Beta Was this translation helpful? Give feedback.
@manoj365study please never again use issues for questions. Discussions have been around for several years now.
JSON Field Mapping documents every JSON logging feature RabbitMQ supports. There are no plans to add anything on top of that, so if that's not enough, you will have to use JSON transformation tools of your own.