|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
org.objectweb.util.monolog.wrapper.javaLog.GenericHandler
public class GenericHandler
Is a generic handler implementation used to wrapper java.util.logging.Handler instance.
Field Summary | |
---|---|
java.util.logging.Handler |
handler
The real handler |
protected java.lang.String |
name
The name of the handler |
protected java.lang.String |
type
the type of the handler (see org.objectweb.util.monolog.api.Handler for the possible values) |
Fields inherited from interface org.objectweb.util.monolog.api.Handler |
---|
APPEND_MODE_ATTRIBUTE, BUFFER_ATTRIBUTE, CONSOLE_HANDLER_TYPE, FILE_HANDLER_TYPE, FILE_NUMBER_ATTRIBUTE, GENERIC_HANDLER_TYPE, JMX_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE |
Constructor Summary | |
---|---|
GenericHandler()
|
|
GenericHandler(java.lang.String name)
|
|
GenericHandler(java.lang.String name,
java.util.logging.Handler h)
builds a generic handler since a real handler. |
|
GenericHandler(java.lang.String name,
java.lang.String type)
Builds a generic handler with its name and the type. |
Method Summary | |
---|---|
void |
close()
Close the Handler and free all associated resources. |
void |
flush()
Flush any buffered output. |
java.lang.Object |
getAttribute(java.lang.String n)
It retrieves the value of an attribute value of the handler. |
java.lang.String[] |
getAttributeNames()
It retrieves the attributes of the handler |
java.lang.String |
getEncoding()
Return the character encoding for this Handler. |
java.util.logging.Filter |
getFilter()
Get the current Filter for this Handler. |
java.util.logging.Formatter |
getFormatter()
Return the Formatter for this Handler. |
java.util.logging.Level |
getLevel()
Get the log level specifying which messages will be logged by this Handler. |
java.lang.String |
getName()
It retrieves the name of the handler |
java.lang.String |
getType()
It retrieves the Handler type |
boolean |
isLoggable(java.util.logging.LogRecord record)
Check if this Handler would actually log a given LogRecord. |
void |
publish(java.util.logging.LogRecord record)
Publish a LogRecord. |
java.lang.Object |
setAttribute(java.lang.String _name,
java.lang.Object value)
It assigns an attributte to the handler. |
void |
setEncoding(java.lang.String encoding)
Set the character encoding used by this Handler. |
protected void |
setException(java.lang.Exception exception)
Set the most recent IO exception. |
void |
setFilter(java.util.logging.Filter newFilter)
Set a Filter to control output on this Handler. |
void |
setFormatter(java.util.logging.Formatter newFormatter)
Set a Formatter. |
void |
setLevel(java.util.logging.Level newLevel)
Set the log level specifying which message levels will be logged by this Handler. |
void |
setName(java.lang.String name)
It assigns the name of the handler |
Methods inherited from class java.util.logging.Handler |
---|
getErrorManager, reportError, setErrorManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.logging.Handler handler
protected java.lang.String type
protected java.lang.String name
Constructor Detail |
---|
public GenericHandler()
public GenericHandler(java.lang.String name)
public GenericHandler(java.lang.String name, java.lang.String type)
name
- is the name of the handlertype
- is the type of the handlerpublic GenericHandler(java.lang.String name, java.util.logging.Handler h)
name
- is the name of the handlerh
- is the real handlerMethod Detail |
---|
public java.lang.String getName()
getName
in interface Handler
public void setName(java.lang.String name)
setName
in interface Handler
public java.lang.String getType()
getType
in interface Handler
public java.lang.String[] getAttributeNames()
getAttributeNames
in interface Handler
public java.lang.Object getAttribute(java.lang.String n)
getAttribute
in interface Handler
name
- is an attribute namepublic java.lang.Object setAttribute(java.lang.String _name, java.lang.Object value)
setAttribute
in interface Handler
_name
- is the attribute namevalue
- is the attribute value
public void close()
close
in class java.util.logging.Handler
public void flush()
flush
in class java.util.logging.Handler
public java.lang.String getEncoding()
getEncoding
in class java.util.logging.Handler
public java.util.logging.Filter getFilter()
getFilter
in class java.util.logging.Handler
public java.util.logging.Formatter getFormatter()
getFormatter
in class java.util.logging.Handler
public java.util.logging.Level getLevel()
getLevel
in class java.util.logging.Handler
public boolean isLoggable(java.util.logging.LogRecord record)
isLoggable
in class java.util.logging.Handler
public void publish(java.util.logging.LogRecord record)
publish
in class java.util.logging.Handler
public void setEncoding(java.lang.String encoding) throws java.lang.SecurityException, java.io.UnsupportedEncodingException
setEncoding
in class java.util.logging.Handler
java.lang.SecurityException
java.io.UnsupportedEncodingException
protected void setException(java.lang.Exception exception)
public void setFilter(java.util.logging.Filter newFilter)
setFilter
in class java.util.logging.Handler
public void setFormatter(java.util.logging.Formatter newFormatter)
setFormatter
in class java.util.logging.Handler
public void setLevel(java.util.logging.Level newLevel)
setLevel
in class java.util.logging.Handler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |