Search code examples
javalog4jweblogic

How to display log4j timestamp in angular brackets


I want to display the timestamp in the log using angular brackets, [Jan 21, 2016 13:01:54] should display as . Below
is my conversion pattern. I tried to change the square brackets to angular but it doesn't display in the right format. I am trying to change it below to match the weblogic log as the weblogic displays it in this
format. Please assist.

<param name="ConversionPattern" value="%x [%d{MMM dd, yyyy HH:mm:ss}] 
 [%t]   % -5p [%c] - %m%n"/>

Thanks in advance.


Solution

  • You can escape < by using &lt; and > by &gt; in html or xml based contexts.