On Fri, Mar 15, 2013 at 11:29 AM, Dmitry Bigunyak <ices...@inbox.ru> wrote:

> Yes, that's actually how I see it, get the raw data, format them to a
> certain type and pass to an appender.
> As a matter of fact, this is exactly what Layouts allow me to do. I was
> wrong saying that they are meant to render strings only. If fact you get an
> array ref with all raw data inside the render() method. Maybe this is a bit
> which is missing in the FAQ, "How can I write my own layout?". :)
> So, I can implement my own Layout::JSON or/and Layout::XML and use them
> with different appenders which working with strings. Nice! The only thing
> I'm missing here is the ability to use built in layouts like PatternLayout
> when I want to dump JSON to a log file as a formatted string. Or another
> example, compressing the data before passing them to the appender. That
> brings me to the idea of having a chain of layout (in current terminology)
> when you get an actual result passed through a number of layouts and
> formatted in each of them accordingly. But maybe this is a controversial
> feature request and should be discussed in a separate thread.
>
> /Dmitry
>
> Пятница, 15 марта 2013, 8:01 +01:00 от Lee < lee...@gmail.com >:
> > Sorry to reply to such a long and thoughtful e-mail with a URI, but do
> > you think being given access to the raw data would give you sufficient
> > means to format it?
> >
> >
> http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#e8a46
> >
> > Could you then forward the formatted data to an appender of your
> > choice/via appenders listed in the config?
> >
> > Lee
> >
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> log4perl-devel mailing list
> log4perl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/log4perl-devel
>

You might want to check out Message::Passing [1],
Log::Dispatch::Message::Passing [2] to get your Log4perl messages into it
and my Message::Passing::Output::Log::Any::Adapter [3] for the other
direction.
I wrote it to use Message::Passing to parse syslog messages and mail them
using Log4perl with Log::Dispatch::Email.

Keep us updated because I'm planning to push the log messages of all my
Log4perl based Catalyst and MooseX::App::Cmd apps to a central log store,
probably ElasticSearch and am interested in your use case and solution.

[1] https://metacpan.org/module/Message::Passing
[2] https://metacpan.org/module/Log::Dispatch::Message::Passing
[3] https://metacpan.org/module/Message::Passing::Output::Log::Any::Adapter
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to