Note that there are some explanatory texts on larger screens.

plurals
  1. POwhy is a .lck file created and not deleted by java logging
    primarykey
    data
    text
    <p>I am trying to implement an application level logger (webapps deployed in weblogic) - using java.util.logging .</p> <p>I took the ClassLoaderLogManager from apache JULI logging system since it already implements application level logging.</p> <p>So this is how my servlet code (<strong>SimpleServlet</strong>.java) looks like :</p> <pre><code>ClassLoaderLogManager ClassLoaderLogManager = new ClassLoaderLogManager () ; String nameoflogger = SimpleServlet.class.getName() ; boolean status = ClassLoaderLogManager .addLogger(nameoflogger); if(status) { Logger logger = ClassLoaderLogManager .getLogger(nameoflogger); logger.log(Level.FINEST, "testing SimpleServlet FINEST"); logger.log(Level.INFO, "testing SimpleServlet INFO"); logger.log(Level.SEVERE, "testing SimpleServlet SEVERE"); } ClassLoaderLogManager .reset(); </code></pre> <p>And i have the logging.properties file in java_home/jre/lib as follows</p> <pre><code>handlers= java.util.logging.FileHandler #.level= INFO # default file output is in user's home directory. java.util.logging.FileHandler.pattern = %h/java_%g.log java.util.logging.FileHandler.limit = 200 java.util.logging.FileHandler.count = 10 java.util.logging.FileHandler.append = true java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter # Limit the message that are printed on the console to INFO and above. #java.util.logging.ConsoleHandler.level = INFO #java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter package8.SimpleServlet.handler = java.util.logging.FileHandler ############################################################ # Facility specific properties. # Provides extra control for each logger. ############################################################ # For example, set the com.xyz.foo logger to only log SEVERE # messages: package8.SimpleServlet.level = SEVERE </code></pre> <p>So when i run the webapp - and as i access the webapp i expect java_0.log, java_1.log (log file rotation)- etc to be created. But am also seeing java0.log.lck, java1.log.lck .</p> <p>The logs files are only showing SEVERE level logs as expected. </p> <p>Why does this happen ? If i has creating a handler on the java code side , closing the handler would solve the issue . Buy y isnt it handled here ?</p> <p>Or is it because am using am using <strong>java.util.logging.FileHandler</strong> and not <strong>org.apache.juli.FileHandler</strong> while using <strong>org.apache.juli.ClassLoaderLogManager</strong> ??</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload