You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I use few laravel log channels at the same time for different log management systems.
There are also third-party components that listen to the Illuminate\Log\Events\MessageLogged and try to handle to it.
But to implement all my event handling needs, I need information about the channel name to process only certain event logs. Or information about the log driver.
As a workaround, I can add a parameter to each withContext logger with the name of the logger or the features of processing its events. But there are disadvantages:
context parameter names should be standardized to integrate with third party libraries. when changing the names of the integration will break.
someone might forget to do it
the context value can be overridden or cleared in my code or third party code.
context values are also logged, this may not be desirable.
Adding channel name to the MessageLogged will be the most reliable way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I use few laravel log channels at the same time for different log management systems.
There are also third-party components that listen to the
Illuminate\Log\Events\MessageLogged
and try to handle to it.But to implement all my event handling needs, I need information about the channel name to process only certain event logs. Or information about the log driver.
As a workaround, I can add a parameter to each
withContext
logger with the name of the logger or the features of processing its events. But there are disadvantages:Adding channel name to the
MessageLogged
will be the most reliable way.One of my cases: getsentry/sentry-laravel#637
Beta Was this translation helpful? Give feedback.
All reactions