ExtLogRecord
instances.
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile Charset | |
| private volatile boolean | |
| private static final Permission | |
| private static final ErrorManager | |
| private volatile boolean | |
| private volatile ErrorManager | |
| private volatile Filter | |
| private volatile Formatter | |
| protected volatile Handler[] | handlers
The sub-handlers for this handler. |
| protected static final AtomicArray | handlersUpdater
The atomic updater for the |
| private volatile Level | |
| protected final ReentrantLock |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected static void | |
| protected static void | |
| public Handler[] | Returns: the old sub-handler arrayA convenience method to atomically get and clear all sub-handlers. |
| public void | close()
Implements abstract java. Implements java. Close all child handlers. |
| protected void | doPublish(final ExtLogRecord
the log record to publish record)Do the actual work of publication; the record will have been filtered already. |
| public void | flush()
Implements abstract java. Implements java. Flush all child handlers. |
| private static boolean | |
| public Charset | |
| public String | Returns: the handler character set nameOverrides java. Get the name of the handler's character set. |
| public ErrorManager | getErrorManager()
Overrides java. Retrieves the ErrorManager for this Handler. |
| public Filter | |
| public Formatter | getFormatter()
Overrides java. Return the |
| public Handler[] | |
| public Level | getLevel()
Overrides java. Get the log level specifying which messages will be
logged by this |
| public boolean | |
| public boolean | Returns: true if the caller should be calculated, otherwise false if it can be skippedIndicates whether or not the formatter associated with this handler or a formatter from a child handler requires the caller to be calculated. |
| public boolean | Returns: true if the children handlers should be closed when this handler is closed, false if
children handlers should not be closed when this handler is closedIndicates whether or not children handlers should be closed when this handler is closed. |
| public final boolean | Returns: true if the handler is enabled, otherwise false.Determine if the handler is enabled. |
| public void | publish(final LogRecord
description of the log event. A null record is
silently ignored and is not published record)Implements abstract java. Publish a |
| public void | |
| protected void | publishToNestedHandlers(final ExtLogRecord
the log record to publish record)Publish a log record to each nested handler. |
| public void | |
| protected void | reportError(String
a descriptive string (may be null) msg, Exception an exception (may be null) ex, int an error code defined in ErrorManager code)Overrides java. Protected convenience method to report an error to this Handler's ErrorManager. |
| public static void | reportError(Handler
the handler handler, String the error message msg, Exception the exception ex, int the error code code)Report an error using a handler's specific error manager, if any. |
| public void | setAutoFlush(final boolean
true to automatically flush after each write; false otherwiseChange the autoflush setting for this handler. |
| public void | setCharset(final Charset
the character set (must not be charset)null)Set the handler's character set. |
| protected void | setCharsetPrivate(final Charset
the character set (must not be charset)null)Set the handler's character set from within this handler. |
| public void | setCloseChildren(final boolean
true if all children handlers should be closed when this handler is closed,
false if children handlers will not be closed when this handler
is closedSets whether or not children handlers should be closed when this handler is closed. |
| public final void | setEnabled(final boolean
true to enable the handler or false to disable the handler.Enables or disables the handler based on the value passed in. |
| public void | setEncoding(final String
the name of the encoding encoding)Overrides java. Set the handler's character set by name. |
| public void | setErrorManager(final ErrorManager
the new ErrorManager em)Overrides java. Define an ErrorManager for this Handler. |
| public void | setFilter(final Filter
a newFilter)Filter object (may be null)Overrides java. Set a |
| public void | setFormatter(final Formatter
the newFormatter)Formatter to use (may not be null)Overrides java. Set a |
| public Handler[] | Returns: the old sub-handler arraythe new sub-handlers newHandlers)A convenience method to atomically get and replace the sub-handler array. |
| public void | setLevel(final Level
the new value for the log level newLevel)Overrides java. Set the log level specifying which message levels will be
logged by this |
| autoFlush | back to summary |
|---|---|
| private volatile boolean autoFlush | |
| charset | back to summary |
|---|---|
| private volatile Charset charset | |
| closeChildren | back to summary |
|---|---|
| private volatile boolean closeChildren | |
| CONTROL_PERMISSION | back to summary |
|---|---|
| private static final Permission CONTROL_PERMISSION | |
| DEFAULT_ERROR_MANAGER | back to summary |
|---|---|
| private static final ErrorManager DEFAULT_ERROR_MANAGER | |
| enabled | back to summary |
|---|---|
| private volatile boolean enabled | |
| errorManager | back to summary |
|---|---|
| private volatile ErrorManager errorManager | |
| filter | back to summary |
|---|---|
| private volatile Filter filter | |
| formatter | back to summary |
|---|---|
| private volatile Formatter formatter | |
| handlers | back to summary |
|---|---|
| protected volatile Handler[] handlers The sub-handlers for this handler. May only be updated using the
| |
| handlersUpdater | back to summary |
|---|---|
| protected static final AtomicArray<ExtHandler, Handler> handlersUpdater The atomic updater for the | |
| level | back to summary |
|---|---|
| private volatile Level level | |
| lock | back to summary |
|---|---|
| protected final ReentrantLock lock | |
| ExtHandler | back to summary |
|---|---|
| protected ExtHandler() Construct a new instance. | |
| addHandler | back to summary |
|---|---|
| public void addHandler(Handler handler) throws SecurityException Add a sub-handler to this handler. Some handler types do not utilize sub-handlers.
| |
| checkAccess | back to summary |
|---|---|
| protected static void checkAccess() throws SecurityException Check access.
| |
| checkAccess | back to summary |
|---|---|
| protected static void checkAccess(final ExtHandler handler) throws SecurityException
Deprecated
Check access.
| |
| clearHandlers | back to summary |
|---|---|
| public Handler[] clearHandlers() throws SecurityException A convenience method to atomically get and clear all sub-handlers.
| |
| close | back to summary |
|---|---|
| public void close() throws SecurityException Implements abstract java. Implements java. Close all child handlers.
| |
| doPublish | back to summary |
|---|---|
| protected void doPublish(final ExtLogRecord record) Do the actual work of publication; the record will have been filtered already. The default implementation
does nothing except to flush if the
| |
| flush | back to summary |
|---|---|
| public void flush() Implements abstract java. Implements java. Flush all child handlers.
| |
| formatterRequiresCallerCalculation | back to summary |
|---|---|
| private static boolean formatterRequiresCallerCalculation(final Formatter formatter) | |
| getCharset | back to summary |
|---|---|
| public Charset getCharset() Get the handler's character set.
| |
| getEncoding | back to summary |
|---|---|
| public String getEncoding() Overrides java. Get the name of the handler's character set. | |
| getErrorManager | back to summary |
|---|---|
| public ErrorManager getErrorManager() Overrides java. Doc from java. Retrieves the ErrorManager for this Handler.
| |
| getFilter | back to summary |
|---|---|
| public Filter getFilter() Overrides java. Doc from java. Get the current | |
| getFormatter | back to summary |
|---|---|
| public Formatter getFormatter() Overrides java. Doc from java. Return the | |
| getHandlers | back to summary |
|---|---|
| public Handler[] getHandlers() Get a copy of the sub-handlers array. Since the returned value is a copy, it may be freely modified.
| |
| getLevel | back to summary |
|---|---|
| public Level getLevel() Overrides java. Doc from java. Get the log level specifying which messages will be
logged by this | |
| isAutoFlush | back to summary |
|---|---|
| public boolean isAutoFlush() Determine if this handler will auto-flush.
| |
| isCallerCalculationRequired | back to summary |
|---|---|
| public boolean isCallerCalculationRequired() Indicates whether or not the formatter associated with this handler or a formatter from a child handler requires the caller to be calculated.
Calculating the caller on a log record can be an expensive operation. Some handlers
may be required to copy some data from the log record, but may not need the caller information. If the
formatter is a
| |
| isCloseChildren | back to summary |
|---|---|
| public boolean isCloseChildren() Indicates whether or not children handlers should be closed when this handler is closed.
| |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled() Determine if the handler is enabled.
| |
| publish | back to summary |
|---|---|
| public void publish(final LogRecord record) Implements abstract java. Doc from java. Publish a
The logging request was made initially to a
The
| |
| publish | back to summary |
|---|---|
| public void publish(final ExtLogRecord record) Publish an The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
The
| |
| publishToNestedHandlers | back to summary |
|---|---|
| protected void publishToNestedHandlers(final ExtLogRecord record) Publish a log record to each nested handler.
| |
| removeHandler | back to summary |
|---|---|
| public void removeHandler(Handler handler) throws SecurityException Remove a sub-handler from this handler. Some handler types do not utilize sub-handlers.
| |
| reportError | back to summary |
|---|---|
| protected void reportError(String msg, Exception ex, int code) Overrides java. Doc from java. Protected convenience method to report an error to this Handler's ErrorManager. Note that this method retrieves and uses the ErrorManager without doing a security check. It can therefore be used in environments where the caller may be non-privileged. | |
| reportError | back to summary |
|---|---|
| public static void reportError(Handler handler, String msg, Exception ex, int code) Report an error using a handler's specific error manager, if any. | |
| setAutoFlush | back to summary |
|---|---|
| public void setAutoFlush(final boolean autoFlush) throws SecurityException Change the autoflush setting for this handler.
| |
| setCharset | back to summary |
|---|---|
| public void setCharset(final Charset charset) throws SecurityException Set the handler's character set. If not set, the handler's character set is initialized to the platform default character set.
| |
| setCharsetPrivate | back to summary |
|---|---|
| protected void setCharsetPrivate(final Charset charset) throws SecurityException Set the handler's character set from within this handler. If not set, the handler's character set is initialized to the platform default character set.
| |
| setCloseChildren | back to summary |
|---|---|
| public void setCloseChildren(final boolean closeChildren) Sets whether or not children handlers should be closed when this handler is closed.
| |
| setEnabled | back to summary |
|---|---|
| public final void setEnabled(final boolean enabled) throws SecurityException Enables or disables the handler based on the value passed in.
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(final String encoding) throws SecurityException, UnsupportedEncodingException Overrides java. Set the handler's character set by name. This is roughly equivalent to calling
| |
| setErrorManager | back to summary |
|---|---|
| public void setErrorManager(final ErrorManager em) Overrides java. Doc from java. Define an ErrorManager for this Handler. The ErrorManager's "error" method will be invoked if any errors occur while using this Handler.
| |
| setFilter | back to summary |
|---|---|
| public void setFilter(final Filter newFilter) throws SecurityException Overrides java. Doc from java. Set a
For each call of
| |
| setFormatter | back to summary |
|---|---|
| public void setFormatter(final Formatter newFormatter) throws SecurityException Overrides java. Doc from java. Set a
Some
| |
| setHandlers | back to summary |
|---|---|
| public Handler[] setHandlers(final Handler[] newHandlers) throws SecurityException A convenience method to atomically get and replace the sub-handler array.
| |
| setLevel | back to summary |
|---|---|
| public void setLevel(final Level newLevel) throws SecurityException Overrides java. Doc from java. Set the log level specifying which message levels will be
logged by this
The intention is to allow developers to turn on voluminous
logging, but to limit the messages that are sent to certain
| |