Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: log4perl long lines

by ramlight (Friar)
on Mar 05, 2012 at 16:53 UTC ( #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? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2022-08-10 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?