java.io.IOException: Couldn't get lock for applicationLog.xml

D

D i s h a n

Hi Experts
im working with tomcat5 and use java logging api for logging perpose.
But When I run the application it will create huge number of files(0
bytes) in tomcat bin folder
with following exception.

java.io.IOException: Couldn't get lock for applicationLog.xml


This is my own logger class constructor:
-------------------------------------------------------------------------

public CLogger( String className ) {


try {
this.logger = Logger.getLogger( className );


// set log level to ALL as default
this.logger.setLevel(Level.ALL);
int limit = 1024 * 1024; // 1 Mb
// Create a new handler that uses the XML formatter
fileHandler = new FileHandler( logFilePath + logFileName,
limit,
1, true );
// set File formatter
fileHandler.setFormatter( new XMLFormatter() );
fileHandler.setLevel(Level.WARNING);
// set handler
this.logger.addHandler( fileHandler );


} catch (Exception e) {
e.printStackTrace();
}


}
-------------------------------------------------------------------------



Thanks in advance
Dishan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top