Adding Header line in PatternLayout?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Adding Header line in PatternLayout?

John Lussmyer-2
I'd like to add a custom Header line to each log that RollingRandomAccessFile produces.
As a test, I've added as simple "header=xxxx" attribute to the PatternLayout.
It's not being output, and log4j isn't reporting any errors.

I've added this to the RollingRandomAccessFile block:
                        <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%20.20t] %-5level %30.30logger - %msg%n" header="Application: ${sys:metrixAppName}%n"/>
The pattern works, but I'm not seeing the "Application ..." line in the log file.




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]