Yes I have made the encoder as below

<pattern>%p [%d{yyyy-MM-dd HH:mm:ss,SSS}] %c{3}:[%C{1}:%M:%L] -
[%t][%file:%line] -
%replace(%.-20480m){'[^A-Za-z0-9=&lt;&gt;:@\\-\\[\\]\n\\s!]','_'}%n
 </pattern>

But line number & file name is not showing up for example

INFO [2018-01-19 16:39:31] c.v.c.u.GCNotificationListener:[?:?:?] -
[Service Thread] - GC_DETAILS _ ID=9_ GC_TYPE=end of minor GC_ GC_NAME=PS
Scavenge_ DURATION_millis_=43_ GC_CAUSE=Allocation Failure_
GC_START_TIME_millsAfterJVMStart_=7198_ GC_END_TIME_millsAfterJVMStart_=7241


On Fri, Jan 19, 2018 at 6:10 PM, Debraj Manna <[email protected]>
wrote:

> Crossposting from stackoverflow
> <https://stackoverflow.com/questions/48341348/how-to-add-less-than-and-greater-than-in-logback-xml>
>
> Can someone let me know how can I add less than (<) and greater than (>)
> sign in logback.xml?
>
> I want to have a encoder.pattern like below
>
> <encoder>
>  <pattern>%p [%d{yyyy-MM-dd HH:mm:ss,SSS}] %c{3}:[%C{1}:%M:%L] - [%t] - 
> %replace(%.-20480m){'[^A-Za-z0-9=<>:@\\-\\[\\]\n\\s!]','_'}%n
>  </pattern><encoder>
>
> But this is failing because of the presence of <> ?
>
> Thanks,
> Debraj
>
>
>
_______________________________________________
logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to