This adapter is much like the 'Test' adapter, but is intended
for end users. It can log to an arrayref or a coderef, and
has several convenient options that allow capturing the entire
structured form of a message, or just the text. It supports a
log_level filter as well.
I've been using a simpler version of this in my projects for a
long time, specifically for the cases where a web request runs
and calls out to a module which uses Log::Any but then I want
the client to see the log messages rather than have them go to
the webserver log file.
Wow, that's really nice. I can see this being incredibly useful for testing as well: It's much less magical than the Test adapter. I might end up replacing the Test adapter with this one :) Thanks!
This adapter is much like the 'Test' adapter, but is intended for end users. It can log to an arrayref or a coderef, and has several convenient options that allow capturing the entire structured form of a message, or just the text. It supports a log_level filter as well.
I've been using a simpler version of this in my projects for a long time, specifically for the cases where a web request runs and calls out to a module which uses Log::Any but then I want the client to see the log messages rather than have them go to the webserver log file.