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
Glad you liked it, and sorry for just seeing this today.
why is scopes an array? What happens if I define multiple scopes?
The scopes are just a way to differentiate the log sources, I use it when outputting JSON to log aggregators that supports extraction/filters.
You can use transform to output scopes in a different format if you want (in text mode)
can I specify the scope when logging a message? If so, how?
Unfortunately there's no way to change the scope when writing individual messages, but you can use the enhance example to clone the same logger setup into different scopes and use those instead.
Hey, thanks for this little gem of a library 👍 🎉
I was trying to figure out how to replace the default
zoya
scope in the log messages, and here's what I came up with:Is this the right way to do it? I figured this out by reading the tests (which were very easy to read 👍 ) but I'm not sure if I've missed something:
scopes
an array? What happens if I define multiple scopes?I guess some more examples might be useful. The santa one is cute but not very illustrative :)
If you prefer to just explain to me here in the issue how to use it, I can send a PR with an update to the docs.
The text was updated successfully, but these errors were encountered: