You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Balaji Saranathan <ba...@wipro.com> on 2005/07/06 17:32:36 UTC

Clarification


Hi,

Can you tell me if log4j creates the log file (if they are not present)
when using the FileAppenders or is it the responsibility of the
developers to create the log files?
I have a FileAppender configured and when I configure the
log4j.appender.framework.File=framework.log=./logs/framework.log
I get a the following error on stdout.log

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: .\logs\framework.log (The system cannot
find the path specified)
	at java.io.FileOutputStream.openAppend(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
	at org.apache.log4j.FileAppender.setFile(FileAppender.java:282)
	at
org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:16
5)
	at
org.apache.log4j.FileAppender.activateOptions(FileAppender.java:161)
	at
org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
	at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java
:132)
	at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java
:96)
	at
org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator
.java:654)
	at
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator
.java:612)
	at
org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConf
igurator.java:509)
	at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
ava:415)
	at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j
ava:441)
	at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConver
ter.java:468)







Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

RE: Clarification

Posted by Balaji Saranathan <ba...@wipro.com>.
Thanks ...that saves my effort on investigating further. 

-----Original Message-----
From: Mark Womack [mailto:womack@adobe.com] 
Sent: Wednesday, July 06, 2005 1:35 PM
To: 'Log4J Users List'
Subject: RE: Clarification


This is bug 9150 in the log4j bug db, and will be fixed in the upcoming
1.2.12 version.  I got the fix together over the weekend, but still
working on a unit test before checking it into cvs.

-Mark

> -----Original Message-----
> From: James Stauffer [mailto:stauffer.james@gmail.com]
> Sent: Wednesday, July 06, 2005 10:07 AM
> To: Log4J Users List; balaji.saranathan@wipro.com
> Subject: Re: Clarification
> 
> log4j will create the file but not the directories.  (I ended up 
> creating my own appender that creates the directories also).
> 
> On 7/6/05, Balaji Saranathan <ba...@wipro.com> wrote:
> > Can you tell me if log4j creates the log file (if they are not 
> > present) when using the FileAppenders or is it the responsibility of

> > the developers to create the log files?
> 
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: Clarification

Posted by Mark Womack <wo...@adobe.com>.
This is bug 9150 in the log4j bug db, and will be fixed in the upcoming
1.2.12 version.  I got the fix together over the weekend, but still working
on a unit test before checking it into cvs.

-Mark

> -----Original Message-----
> From: James Stauffer [mailto:stauffer.james@gmail.com]
> Sent: Wednesday, July 06, 2005 10:07 AM
> To: Log4J Users List; balaji.saranathan@wipro.com
> Subject: Re: Clarification
> 
> log4j will create the file but not the directories.  (I ended up
> creating my own appender that creates the directories also).
> 
> On 7/6/05, Balaji Saranathan <ba...@wipro.com> wrote:
> > Can you tell me if log4j creates the log file (if they are not present)
> > when using the FileAppenders or is it the responsibility of the
> > developers to create the log files?
> 
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Clarification

Posted by James Stauffer <st...@gmail.com>.
log4j will create the file but not the directories.  (I ended up
creating my own appender that creates the directories also).

On 7/6/05, Balaji Saranathan <ba...@wipro.com> wrote:
> Can you tell me if log4j creates the log file (if they are not present)
> when using the FileAppenders or is it the responsibility of the
> developers to create the log files?

-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org