Skip to content
Discussion options

You must be logged in to vote

The purpose of the attach approach is that logging can be done by Mojolicious via its normal logger, but those messages are sent to the other logging system (and, if you unsubscribe the original handler, turns off the standard logging mechanism). Since you're using Log::Any, you can also use that other logging system independently.

The MojoLog adapter is the reverse setup: Log::Any and its normal logging methods are the input, and the Mojo::Log object that you pass is the thing that does the actual logging. You could theoretically stack these and use Mojo::Log as both input and output, or vice versa, but it would be quite silly.

So in essence, I would suggest doing whatever makes the most…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ajmetz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants