Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: log4perl long lines

by ramlight (Friar)
on Mar 05, 2012 at 16:53 UTC ( [id://957927]=note: print w/replies, xml ) Need Help??


in reply to log4perl long lines

If you are willing to preformat your log lines (perhaps with a logging subroutine) you can define two loggers that log to the same file. One has the normal pattern layout, the other has blank space at the beginning of the conversion:
# Untested but I have used similar code log4perl.appender.file1 = Log::Log4perl::Appender::File log4perl.appender.file1.filename = 'File.log' log4perl.appender.file1.mode = append log4perl.appender.file1.layout = Log::Log4perl::Layout::Patter +nLayout log4perl.appender.file1.layout.ConversionPattern = %d{E MMM dd yyy +y HH:mm:ss} - %m log4perl.appender.file1 = Log::Log4perl::Appender::File log4perl.appender.file1.filename = 'File.log' log4perl.appender.file1.mode = append log4perl.appender.file1.layout = Log::Log4perl::Layout::Patter +nLayout log4perl.appender.file2.layout.ConversionPattern = - + %m

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://957927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found