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 Shawn Smith <sh...@civildesignservices.com> on 2002/06/15 09:41:22 UTC

On RollingFileAppender, the filename resets to null

I am using the Log4j version 1.2.4 running on Tomcat ver 3.2.3.

When setting the filename and then activatingOptions, the filename is reset
to null.

I have tried many different variations of the filename:

log4j.log -- the basic
/home/virtual/mysite.com/var/www/html/log4j.log  -- specific

Using context.getRealPath("/") I get /home/virtual/site17/fst/var/www/html/
but my webhost says my path is actually
/home/virtual/cadtutor.com/var/www/html/

I have tried both and the filename always sets to null and I don't get a log
file, anywhere...I had my host search the server and it wasn't anywhere to
be found.

Anybody have any ideas.

Note:  Console logging works fine so I believe my installation and
implementation of the package is correct.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: On RollingFileAppender, the filename resets to null

Posted by Thomas Tuft Muller <tt...@online.no>.
Shawn,

My guess is that the Tomcat process owner lacks the proper permissions to
create the file. However, it's a good idea to log relative to the
getRealPath folder, and utilize the interpolation support in
PropertyConfigurator/XMLConfigurator.

	<param name="file" value="${log.folder}/foo.log />

The same thing applies when setting the appender programmatically.

I do both, and it works fine.

Hope this helps,

--

Thomas




| -----Original Message-----
| From: Shawn Smith [mailto:shawn@civildesignservices.com]
| Sent: 15 June 2002 08:41
| To: log4j-user@jakarta.apache.org
| Subject: On RollingFileAppender, the filename resets to null
|
|
| I am using the Log4j version 1.2.4 running on Tomcat ver 3.2.3.
|
| When setting the filename and then activatingOptions, the
| filename is reset
| to null.
|
| I have tried many different variations of the filename:
|
| log4j.log -- the basic
| /home/virtual/mysite.com/var/www/html/log4j.log  -- specific
|
| Using context.getRealPath("/") I get
| /home/virtual/site17/fst/var/www/html/
| but my webhost says my path is actually
| /home/virtual/cadtutor.com/var/www/html/
|
| I have tried both and the filename always sets to null and I
| don't get a log
| file, anywhere...I had my host search the server and it wasn't anywhere to
| be found.
|
| Anybody have any ideas.
|
| Note:  Console logging works fine so I believe my installation and
| implementation of the package is correct.
|
|
| --
| To unsubscribe, e-mail:
| <ma...@jakarta.apache.org>
| For additional commands, e-mail:
| <ma...@jakarta.apache.org>
|
|


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>