Skip Menu |

This queue is for tickets about the Log-Any-Adapter CPAN distribution.

Maintainer(s)' notes

DO NOT FILE TICKETS HERE

This distribution has been merged with Log-Any. Instead, file tickets on Github here → Log Any Issues.

Report information
The Basics
Id: 85657
Status: resolved
Priority: 0/
Queue: Log-Any-Adapter

People
Owner: Nobody in particular
Requestors: xenoterracide [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: prefix
Date: Mon, 27 May 2013 17:39:36 -0500
To: bugs-log-any-adapter [...] rt.cpan.org
From: Caleb Cushing <xenoterracide [...] gmail.com>
I'd like an option to specify a prefix for loggers. Many loggers do this themselves but since not all do. it'd be nice to be able to pass it as an option, ideally with some way of saying include a formatted timestamp for now (it could take a closure ). -- Caleb Cushing http://xenoterracide.com
On Mon May 27 18:39:55 2013, XENO wrote: Show quoted text
> I'd like an option to specify a prefix for loggers. Many loggers do > this themselves but since not all do. it'd be nice to be able to pass > it as an option, ideally with some way of saying include a formatted > timestamp for now (it could take a closure ).
This seems related to your request for filters in 86794, but on the adapter (log message consumer) side instead of the log message generator side. Off the top of my head, I would think that a Filter adapter would be quite feasible for this. use Log::Any::Adapter Filter => sub { ... } => File => '/path/to/file.log'; I'm not sure about adapter caching, though. Again, I'll ponder this.
The new Log::Any::Proxy class in the new Log-Any-1.XX series has this capability, either a pure string prefix or an arbitrary filter. The happens on the log producer side. Something for the log consumer side would require a new adapter that transforms messages in an arbitrary way.