Bug 51438

Summary: Pipe characters issue in log() method
Product: Log4j - Now in Jira Reporter: goujona
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description goujona 2011-06-27 13:25:56 UTC
In the following code :

String test = "[a|b|c]";
System.out.println("+++ " + test);
logger.log(Level.SEVERE, test);

output is :
+++ [a|b|c]
[a

The pipe character and the following characters are not printed.
I tried doubling it ||, escaping it \|, enclosing it '|', using the unicode char \u007c, none of them work.

I'm using log4j-1.2.14.jar but I tried log4j-1.2.16.jar and the issue is still present.

Maybe | has a special meaning and displaying it requires something special.

Any idea ?
Thanks in advance !