Hello all,
We have some code which writes data to a file and logs a few messages while
doing it, and the log messages are showing up in the *data* file instead of
the *log* file. Has anyone ever seen this? It smells like file handle
reuse. Here is the code:
//Set up logger
static Logger logger = Logger.getLogger(MyClass.class);
//Build filename
String filename = "Order no. " + orderNumber; logger.info("Creating file " +
fileName);
//Write the order file
File file = new File(fileName);
FileWriter fw = new FileWriter(file);
logger.info("Writing File Content ");
fw.write(fileContent + System.getProperty("line.separator"));
logger.info("Closing File ");
fw.close();
This code has been running for over a year with no problems. Today it
started to intermittently write the log messages into the file the code is
creating. Can anyone offer any advice?
Thank you,
Brian Hartin
****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]