Closed
Description
When a message
property is included in the log data payload (ie. the first parameter of the logger call, see example below), that field overrides the actual log message (provided as the second parameter). I realize that this might be hard to "fix" – the only ugly workaround I can think of at the moment would be automatically renaming the data field to something like _message
…
If you consider this a user error, I think a caveat/warning in the docs would be appropriate.
Environment details
- OS: Debian 5.10.158-2
- Node.js version: v18.12.1
- npm version: 8.19.2
- @google-cloud/logging-bunyan version: 4.2.2
Steps to reproduce
- Log a message like this:
logger.info({ message: 'boom' }, 'this is the actual message');