:: com :: sun :: star :: logging ::
|
unpublished |
interface XLogger |
|
|
|
- Usage Restrictions
- not published
- Description
- implemented by a component which is able to log events.
This interface is roughly designed after the
Java
Logging API. However, there are some differences, the major ones being:
- There's no support (yet) for filtering log events.
- There ain't no convenience methods for logging.
- There's no localization support.
- Logger instances do not form a hierarchy.
- Since
- OOo 2.3
|
Methods' Summary |
addLogHandler |
adds the given handler to the list of handlers.
|
removeLogHandler |
removes the given handler from the list of handlers.
|
isLoggable |
determines whether logger instance would produce any output for the given level.
|
log |
logs a given message
|
logp |
logs a given message, detailing the source class and method at which the logged
event occurred.
|
Attributes' Summary |
Name |
denotes the name of the logger.
|
Level |
specifies which log events are logged or ignored.
|
Methods' Details |
addLogHandler
- Description
- adds the given handler to the list of handlers.
When an event is logged, the logger will create a LogRecord
for this event, and pass this record to all registered handlers. Single handlers
might or might not log those records at their own discretion, and depending on
additional restrictions such as filters specified at handler level.
Note: The log level of the given handler (XLogHandler::Level) will
not be touched. In particular, it will not be set to the logger's log level. It's
the responsibility of the component which knits a logger with one or more
log handlers to ensure that all loggers have appropriate levels set.
- Parameter LogHandler
- the handler to add to the list of handlers. The call is ignored if this
parameter is NULL.
|
|
removeLogHandler
- Description
- removes the given handler from the list of handlers.
- Parameter LogHandler
- the handler to remove from the list of handlers. The call is ignored if this
parameter is NULL, or if the handler has not previously been added.
|
|
isLoggable
boolean |
isLoggable( |
[in] long |
Level ); |
- Description
- determines whether logger instance would produce any output for the given level.
The method can be used to optimize performance as maybe complex parameter evaluation
in the log calls can be omitted if isLoggable evaluates to false.
- Parameter Level
- level to be checked against
- Returns
- true if there would be some output for this XLogger for the given level, false
otherwise. Note that a return value of false could also indicate that the logger
does not have any log handlers associated with it.
- See also
- addLogHandler, removeLogHandler
|
|
log
void |
log( |
[in] long |
Level, |
| [in] string |
Message ); |
- Description
- logs a given message
- Parameter Level
- the log level of this message. If this level is smaller than the logger's Level
attribute, then the call will be ignored.
- Parameter Message
- the message to log
|
|
logp
void |
logp( |
[in] long |
Level, |
| [in] string |
SourceClassName, |
| [in] string |
SourceMethodName, |
| [in] string |
Message ); |
- Description
- logs a given message, detailing the source class and method at which the logged
event occurred.
- Parameter Level
- the log level of this message. If this level is smaller than the logger's Level
attribute, then the call will be ignored.
- Parameter SourceClass
- the source class at which the logged event occurred.
- Parameter SourceMethod
- the source class at which the logged event occurred.
- Parameter Message
- the message to log
|
|
Attributes' Details |
Name
[ readonly ] string Name;
- Description
- denotes the name of the logger.
|
|
Level
long Level;
- Description
- specifies which log events are logged or ignored.
- See also
- LogLevel
|
|
Top of Page
Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.
LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.
The Document Foundation acknowledges all community members, please find more info at our website.
Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.