org.ops4j.pax.logging.service.internal
Class JdkHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.ops4j.pax.logging.service.internal.JdkHandler

public class JdkHandler
extends java.util.logging.Handler


Constructor Summary
JdkHandler(PaxLoggingService logService)
           
 
Method Summary
 void close()
          Close the Handler and free all associated resources.
 void flush()
          Flush any buffered output.
 void publish(java.util.logging.LogRecord record)
          Publish a LogRecord.
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdkHandler

public JdkHandler(PaxLoggingService logService)
Method Detail

close

public void close()
           throws java.lang.SecurityException
Close the Handler and free all associated resources.

The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.

Specified by:
close in class java.util.logging.Handler
Throws:
java.lang.SecurityException - if a security manager exists and if the caller does not have LoggingPermission("control").

flush

public void flush()
Flush any buffered output.

Specified by:
flush in class java.util.logging.Handler

publish

public void publish(java.util.logging.LogRecord record)
Publish a LogRecord.

The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.

The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.

Specified by:
publish in class java.util.logging.Handler
Parameters:
record - description of the log event


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.