|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.logging.Logger
org.jnetpcap.util.JLogger
public class JLogger
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
| Field Summary | |
|---|---|
static java.lang.String |
PROPERTIES_CONFIG
Default resource file with logger configurations. |
| Fields inherited from class java.util.logging.Logger |
|---|
global, GLOBAL_LOGGER_NAME |
| Constructor Summary | |
|---|---|
JLogger(java.lang.String name,
java.lang.String resourceBundleName)
Instantiates a new j logger. |
|
| Method Summary | |
|---|---|
static java.util.logging.Logger |
getLogger(java.lang.Class<?> c)
Gets the logger. |
static java.util.logging.Logger |
getLogger(java.lang.Package p)
Gets the logger. |
static java.util.logging.LogManager |
readConfiguration(java.util.Properties properties)
Read configuration. |
void |
setLevel(java.util.logging.Level newLevel)
Sets the level. |
| 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 |
|---|
public static final java.lang.String PROPERTIES_CONFIG
| Constructor Detail |
|---|
public JLogger(java.lang.String name,
java.lang.String resourceBundleName)
name - the nameresourceBundleName - the resource bundle name| Method Detail |
|---|
public static java.util.logging.Logger getLogger(java.lang.Class<?> c)
c - the c
public static java.util.logging.Logger getLogger(java.lang.Package p)
p - the p
public static java.util.logging.LogManager readConfiguration(java.util.Properties properties)
throws java.lang.SecurityException,
java.io.IOException
properties - the properties
java.lang.SecurityException - the security exception
java.io.IOException - Signals that an I/O exception has occurred.
public void setLevel(java.util.logging.Level newLevel)
throws java.lang.SecurityException
setLevel in class java.util.logging.LoggernewLevel - the new level
java.lang.SecurityException - the security exceptionLogger.setLevel(java.util.logging.Level)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||