Summary: | LOG4J - No stacktrace on unix platform | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | fabrice claes <fabrice.claes> |
Component: | Other | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | espen |
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
source
Output Configuration Output on windows Example that solves the stacktrace problem |
Description
fabrice claes
2002-04-25 09:25:28 UTC
Printing exception is one of the basic features of log4j. I am marking this bug as WORKSFORME unless you can reproduce it with a small program on your UNIX platform. Which UNIX platform is it by the way? Created attachment 1697 [details]
source
Created attachment 1698 [details]
Output
The platform is Compaq tru64 unix v 5.1 on Alpha. I reproduced the problem with a small program on the unix platform. I send you attached the program source, the configuration file and the outputs (on windows and on unix). Version of Log4J is 1.3.1 Created attachment 1699 [details]
Configuration
Created attachment 1700 [details]
Output on windows
What happens if you change <param name="ConversionPattern" value="[%d{dd/MM/yy HH:mm:ss,SSS} %C{1}:%M:%L] % m%n"/> to <param name="ConversionPattern" value="[%d{dd/MM/yy HH:mm:ss,SSS}] %m%n"/> Can you please try that? Thanks, Ceki Created attachment 1919 [details]
Example that solves the stacktrace problem
Hello! I've had the same problem! I've made a patch that works for Tru64 Unix 4.0F Java versions 1.2.2, 1.3.1 and 1.4.0b The problem lies in org.apache.log4j.spi.ThrowableInformation or more accurate the PrintWriter defined in org.apache.log4j.spi.ThrowableInformation's source file. Check attachment (id=1919) Espen Looking at your implementation of ThrowableInformation, the major difference I see is that you are implementing the various write methods of PrintWriter such as write(char[] chars) write(char[] chars, int off, int len) write(String s, int off, int len) write(String s) Are you sure these methods are being called? Are all them called? If not which ones are not? Is the println() method ever called? I don't think using ListArray is of fundamental importance in fixing this bug. Do you? Thank you for your assistance in fixing this bug, Ceki I made quite a while ago so I can't remember which of the methods that are called, but I think it is: write(String) The println() I'm not sure of, sorry! You're right, ArrayList was just what I used. It has nothing to do with the problem. Espen This bug was fixed in log4j 1.2.3 or so. |