This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
You can continue the conversation there. Go to discussion →
logger.error({ payload: '', foo: 'bar' })
(trying to log an arbitrary hash with payload
key)
#250
Environment
Expected Behavior
I'd expect SemanticLogger to be fully compatible with
::Logger
, so I'd expect no error to be raised.Perhaps detecting it's an arbitrary hash and considering it as a message (i.e. treat it the same as
logger.error(message: { payload: '', foo: 'bar' })
and maybe also raise a warning pointing to bad use ofpayload
keyword) would be a good choice.Actual Behavior
stacktrace:
Note: this happened on a real codebase when I was installing
rails_semantic_logger
in our project. I had a change similar to the following to fix it:The text was updated successfully, but these errors were encountered: