Is notification.log really used "as configuration file"?  If so, this might
cause problems because the ">" redirector will truncate that file prior to
appending to it, and so the file maybe empty when log4j attempts to read it
to configure itself.

If, instead, notification.log is just referenced in the log4j config file as
the target for a FileAppender, then this should be fine.

Another option (that I use in my local "pre-dev" environment) is too have
log4j append to stdout by using the ConsoleAppender, and using the redirect
to send stdout to a file.  That way, both System.out print statements and
log4j logging will show up in the same file.


HTH,
Steve



    |-----Original Message-----
    |From: Stephane Nicoll [mailto:[EMAIL PROTECTED]]
    |Sent: Monday, August 26, 2002 3:43 AM
    |To: Log4J Users List
    |Subject: Unix redirection
    |
    |
    |Hi all,
    |
    |I have a rather simple question. Under linux, I start a 
    |Java process with
    |unix redirection
    |
    |
    |java com.foo.MyClass >notification.log
    |
    |This is an old stuff and some parts have been updated to 
    |log4j. Log4j
    |configuration uses notification.log as configuration file.
    |
    |Is it a problem if log4j and the unix redirectionr (>) 
    |work on the same file?
    |
    |Thanks and regards,
    |
    |Stéphane
    |
    |--
    |To unsubscribe, e-mail:   
    |<mailto:[EMAIL PROTECTED]>
    |For additional commands, e-mail: 
    |<mailto:[EMAIL PROTECTED]>
    |

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

Reply via email to