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 Erik Price <ep...@ptc.com> on 2003/04/25 18:45:51 UTC
overwrite FileAppender
Hi,
I have a command line app using Log4J and my log4j configuration
specifies that it writes to a FileAppender. Is there a way to set the
FileAppender to overwrite, rather than append to, the named file? If
not, no problem because I can just have my launcher script delete the
file first.
Also, is there a list of all of the possible property configurations?
I've read the short manual and browsed the javadocs, but I didn't see a
[more complete] guide to the various configurations. (For instance, I
know about ConsoleAppender, RollingFileAppender, and FileAppender from
the short manual, but not sure if I missed something....)
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: overwrite FileAppender
Posted by Erik Price <ep...@ptc.com>.
Thank you both. As for the configurations, I'll just go back to the
javadocs. Thanks again.
Erik
Erik Price wrote:
> Hi,
>
> I have a command line app using Log4J and my log4j configuration
> specifies that it writes to a FileAppender. Is there a way to set the
> FileAppender to overwrite, rather than append to, the named file? If
> not, no problem because I can just have my launcher script delete the
> file first.
>
> Also, is there a list of all of the possible property configurations?
> I've read the short manual and browsed the javadocs, but I didn't see a
> [more complete] guide to the various configurations. (For instance, I
> know about ConsoleAppender, RollingFileAppender, and FileAppender from
> the short manual, but not sure if I missed something....)
>
>
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: overwrite FileAppender
Posted by Jacob Kjome <ho...@visi.com>.
At 12:45 PM 4/25/2003 -0400, you wrote:
>I have a command line app using Log4J and my log4j configuration specifies
>that it writes to a FileAppender. Is there a way to set the FileAppender
>to overwrite, rather than append to, the named file? If not, no problem
>because I can just have my launcher script delete the file first.
Within the FileAppender config use...
<param name="Append" value="false" />
Jake