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
Is there any way to propagate the channel along called functions ?
Nope, this is not how monolog works. What is your use case? Usually, I add a processor to know what command is used
I already have a processor to add the command name to the log file. But I want to separate web logs from console logs into two distinct files so it's easier to look at them.
Maybe it's not a common usage.
In my commands, I want loggers to log into the file
console.log
Here is my
monolog.yaml
conf:In my command I've added this:
#[WithMonologChannel('console')]
Every log in my command are correctly logged to
console.log
but every time I call a function outside my command class, the log is logged ininfo.log
.The issue is that I don't want to add
#[WithMonologChannel('console')]
in my other class since it's used by other services.Is there any way to propagate the channel along called functions ?
The text was updated successfully, but these errors were encountered: