Skip to content

Logger: overwrite keys while logging new stuff #98

Closed
@alvaropc

Description

@alvaropc

Hi!

I am here to ask you about the Keys of the logger.

I see that you can update the keys with structure_logs() method, but once you put a new key and assign a value, you won't be able to change it without calling structure_logs() again.

It would be interesting to be able to overwrite some key values at the same time you are logging, think about some KPI you would like to log as a key for instance, it would be nice to easily overwrite the value.

Although I know it is posible to write keys under "message" key it feels like not the best option for me, the main keys seem to be the place for this kind of information in order to catch it easily with tools like datadog or something like that.

I don't know if I am explaining it correctly but I hope you consider this as a new feature, I would also love to know your opinion about it as well as possible alternative aproaches, maybe I am just missunderstanding the way how you want the logger to be used and wirting more keys under messages is the correct way to do it!

Thank you very much in advance!
And congrats for such an amazing tool!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions