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
While trying to figure out a nice way to provide context to log messages (e.g., prepend some request-specific prefix in a web handler), I ran across logInfoS. From the documentation, it was entirely unclear to me what this "source" might be. It'd be great to be a bit clearer about this.
(I've since read the source code and think that it's actually never used by log functions created through newLogFunc, so perhaps these might even be dropped? I'm going to assume I'm missing something though. It's possible to make use of the source field via mkLogFunc.)
The text was updated successfully, but these errors were encountered:
PR to clear up the docs would be great. Source is intended to be a general purpose field for "what part of your application does this come from." For example, you may say source is "database" to distinguish from "web."
Thanks for looking into this! Would be happy to provide such a PR, but am still a bit confused.
Is it correct that in order to get the source argument displayed, I would have to create my own log function via mkLogFunction, and not be able to build on top of withLogFunc / newLogFunc? That's how I read the source code...
While trying to figure out a nice way to provide context to log messages (e.g., prepend some request-specific prefix in a web handler), I ran across
logInfoS
. From the documentation, it was entirely unclear to me what this "source" might be. It'd be great to be a bit clearer about this.(
I've since read the source code and think that it's actually never used by log functions created throughIt's possible to make use of the source field vianewLogFunc
, so perhaps these might even be dropped? I'm going to assume I'm missing something though.mkLogFunc
.)The text was updated successfully, but these errors were encountered: