org.jnetpcap.util
Class JLogger

java.lang.Object
  extended by java.util.logging.Logger
      extended by org.jnetpcap.util.JLogger

public class JLogger
extends java.util.logging.Logger

Java Logging mechanism. This is a slight extension to JRE's logger that initializes the global logging environmet and adds a couple of convenience methods that are jNetPcap specific. Default jNetPcap properties are loaded as a resource found in CLASSPATH under the resources directory.

Note: standard system properties for JRE's logging system:

 "java.util.logging.config.file" - specifies a .properties file
 "java.util.logging.config.class" - a class configures the LogManager from its 
    constructor
 

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
static java.lang.String PROPERTIES_CONFIG
          Default resource file with logger configurations
 
Fields inherited from class java.util.logging.Logger
global
 
Constructor Summary
JLogger(java.lang.String name, java.lang.String resourceBundleName)
           
 
Method Summary
static java.util.logging.Logger getLogger(java.lang.Class<?> c)
           
static java.util.logging.Logger getLogger(java.lang.Package p)
           
static java.util.logging.LogManager readConfiguration(java.util.Properties properties)
           
 void setLevel(java.util.logging.Level newLevel)
           
 
Methods inherited from class java.util.logging.Logger
addHandler, config, entering, entering, entering, exiting, exiting, fine, finer, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, isLoggable, log, log, log, log, log, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setParent, setUseParentHandlers, severe, throwing, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_CONFIG

public static final java.lang.String PROPERTIES_CONFIG
Default resource file with logger configurations

See Also:
Constant Field Values
Constructor Detail

JLogger

public JLogger(java.lang.String name,
               java.lang.String resourceBundleName)
Parameters:
name -
resourceBundleName -
Method Detail

getLogger

public static java.util.logging.Logger getLogger(java.lang.Class<?> c)

getLogger

public static java.util.logging.Logger getLogger(java.lang.Package p)

readConfiguration

public static java.util.logging.LogManager readConfiguration(java.util.Properties properties)
                                                      throws java.lang.SecurityException,
                                                             java.io.IOException
Throws:
java.lang.SecurityException
java.io.IOException

setLevel

public void setLevel(java.util.logging.Level newLevel)
              throws java.lang.SecurityException
Overrides:
setLevel in class java.util.logging.Logger
Throws:
java.lang.SecurityException