Time, Severity, and Message should be merged after metadata in GoogleCloudLogger
StandardMikeBenza opened this issue · 1 comments
I recently debugged an issue where my log messages weren't showing up as expected. I had introduced a log message that had time
metadata (how long an operation took). Since LoggerJSON.Formatters.GoogleCloudLogger merges the metadata into the map of time
, severity
, and message
, metadata time
replaced the actual timestamp. The same would happen for severity
or message
.
This should at a minimum be documented. Ideally the time
, severity
, and message
would be merged into the metadata. A plus would be some way of warning that the original value had been overwritten and recording the original value.
Hello @StandardMikeBenza, this was true but behaviour is changed in master
branch and now it's not specific to the package. Logger in the latest Elixir versions works on top of Erlang one and it supplies time
as a metadata attribute to the formatters. Not sure if you can override it now or now, but closing since there is nothing we can do about it.