Replies: 2 comments
-
Correct, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would treating keyword arguments and positional arguments differently be an option? E.g.: positional arguments: SemanticLogger['a'].error({ payload: '', foo: 'bar' })
# same as:
SemanticLogger['a'].error(payload: { payload: '', foo: 'bar' }) keyword arguments: SemanticLogger['a'].error(payload: '', foo: 'bar')
# raises error I guess this might be a breaking change though |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:Beta Was this translation helpful? Give feedback.
All reactions