Log4j does not output relative to the log4j directory but to the start directory of your application. Try naming the log file recognizable (for example "mine.log" without the log prefix. Oh and BTW I'd advise to use / instead of \, Java will work on all platforms then) and then search for it. I'll bet there is no "log" directory there.

Tom



DECAFFMEYER MATHIEU wrote:

Hi,
in my log4j file I have the following line :

log4j.appender.file.File=log/mylog.log


[11/01/07 16:28:32:665 CET] 650c2e13 SystemErr R log4j:ERROR setFile(null,true) call failed. [11/01/07 16:28:32:665 CET] 650c2e13 SystemErr R java.io.FileNotFoundException: log\mylog.log (The system cannot find the path specified)

[11/01/07 16:28:32:681 CET] 650c2e13 SystemErr R at java.io.FileOutputStream.openAppend(Native Method) [11/01/07 16:28:32:681 CET] 650c2e13 SystemErr R at java.io.FileOutputStream.<init>(FileOutputStream.java:194)

In the directory where the log4j file is located there is a log directory and in this log directory a file called mylog.log

When I put an absolute path to this mylog.log file, I have no problem,
but this is quite annoying if for some reason the main directory (containing log4j file and log directory) is moved.

Why the relative path won't work ?

Any idea ?
Thank u !

|

============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg S.A. does not accept legal responsibility for the contents of this message. The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice.
============================================
|
------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to