On Tue, 3 Jul 2007, Quinn Weaver wrote: > So, the POD for Log::Log4perl::Appender describes the warp_message property, > and gives some examples. It seems I should be able to return an array, which > should be join'ed and used as the basis for my message. > > But it doesn't work; I get ARRAY(0xa19c948) and the like in my messages. > > I suspect the reason is that my particular appender type doesn't support > warp_message. The POD mentions that Log::Dispatch-based appenders don't work. > But Log::Log4perl::Appender::Screen doesn't work either.
The warp_message option is only for appenders which can handle an array ref instead of a message string. The DBI appender is the only example in the L4p distribution. Or, you can write your own appender (if you look at the screen appender or the FAQ, you'll see that this is trivial). This raises the question: What are you trying to do? Why do you need warp_message? I don't see how you could use it in a meaningful way with the default screen appender. -- Mike Mike Schilli [EMAIL PROTECTED] > > So... which appenders support it, and which don't? The POD should be > more specific, methinks. Thanks for any elucidation you can lend. > > # from my log4perl.conf: > log4perl.appender.screenAppender = Log::Log4perl::Appender::Screen > log4perl.appender.screenAppender.layout = > Log::Log4perl::Layout::PatternLayout > log4perl.appender.screenAppender.layout.ConversionPattern \ > = %d{MMM dd HH:mm:ss} %H: process %8P: client %X{ip}: %X{uri}: %5p: %m%n > log4perl.appender.screenAppender.warp_message = sub { return @_ } > > Thanks, > > -- > Quinn Weaver, independent contractor | President, San Francisco Perl Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > log4perl-devel mailing list > log4perl-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ log4perl-devel mailing list log4perl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/log4perl-devel