weblogic.logging
Class ConsoleHandler
java.lang.Object
|
+--java.util.logging.Handler
|
+--java.util.logging.StreamHandler
|
+--weblogic.logging.ConsoleHandler
- public final class ConsoleHandler
- extends java.util.logging.StreamHandler
A simple handler which outputs messages to System.out.
The handler uses the ConsoleFormatter
to format the
log record objects. The log records that get outputted are filtered
based on configuration parameters specified in the KernelMBean.
The KernelMBean.StdoutEnabled
controls whether the log record
are published to the stdout at all.
The KernelMBean.StdoutDebugEnabled
attribute specifies
whether messages with Debug severity level are outputted to the stdout.
The KernelMBean.StdoutSeverityLevel
controls messages of what
severity level are outputted to the stdout.
For server side logging the ServerMBean which extends KernelMBean can be
used to configure the stdout logging behaviour.
- Author:
- Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
- See Also:
KernelMBean.isStdoutEnabled()
,
KernelMBean.isStdoutDebugEnabled()
,
KernelMBean.getStdoutSeverityLevel()
Method Summary
|
void |
close()
|
boolean |
isLoggable(java.util.logging.LogRecord r)
Performs a check whether a given log record meets the filter criteria
for publishing to the stdout. |
void |
publish(java.util.logging.LogRecord rec)
Publishes the given log record object to the stdout. |
Methods inherited from class java.util.logging.StreamHandler |
flush,
setEncoding,
setOutputStream |
Methods inherited from class java.util.logging.Handler |
getEncoding,
getErrorManager,
getFilter,
getFormatter,
getLevel,
reportError,
setErrorManager,
setFilter,
setFormatter,
setLevel |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ConsoleHandler
public ConsoleHandler(KernelMBean akmb)
- Initializes the console handler with the given KernelMBean.
- Parameters:
akmb
- The KernelMBean reference used to configure this handler.
publish
public void publish(java.util.logging.LogRecord rec)
- Publishes the given log record object to the stdout.
- Parameters:
rec
- The record to be outputted to the stdout.- Overrides:
- publish in class java.util.logging.StreamHandler
isLoggable
public boolean isLoggable(java.util.logging.LogRecord r)
- Performs a check whether a given log record meets the filter criteria
for publishing to the stdout.
- Parameters:
r
- The log record being published.- Returns:
true
If the record meets the filter rules and can
be outputted to stdout false
otherwise.- Overrides:
- isLoggable in class java.util.logging.StreamHandler
close
public void close()
- Overrides:
- close in class java.util.logging.StreamHandler