I have an application that runs from a Web Interface as well as from a command line state. The problem I am having is that when the batch job runs, that it truncates any data that is in the log file that the web has been writing to. I want the output from both places to be kept in a single log file. My log4j configuration looks like the following:
log4j.appender.notifyAgents.layout.ConversionPattern=%d [%t] %-5p %c :: %m%n
And in the java code, I call the following to load the file from a packaged jar file:
Properties props = new Properties();
URL log4jURL = Thread.currentThread().getContextClassLoader().getResource(log4JFile );
props.load( log4jURL.openStream() );
Are there any properties that can be set to allow the batch job to run and write to the file (if it already exists), rather than truncate whats there and then write the data? Any help is greatly appreciated. Thanks.