<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=<>:@\\-\\[\\]\n\\s!]','_'}%n
</pattern>
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
Crossposting from stackoverflowCan 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