LibreOffice: XLogHandler Interface Reference

LibreOffice LibreOffice 24.2 SDK API Reference

Loading...
Searching...
No Matches
Exported Interfaces | Public Member Functions | Public Attributes | List of all members
XLogHandler Interface Reference

provides possibilities to send LogRecords to an arbitrary output channel. More...

`import <XLogHandler.idl;`

Inheritance diagram for XLogHandler:

## Exported Interfaces
interface | ::com::sun::star::lang::XComponent
| allows life time control for the handler

## Public Member Functions
void | flush ()
| flushes all buffered output of the handler
boolean | publish ([in] LogRecord Record)
| publish the given log record at the handler's output channel.
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Public Attributes
string | Encoding
| specifies MIME charset name for the encoding to be used by this handler
XLogFormatter | Formatter
| specifies the formatter to be used by this handler.
long | Level
| specifies the log level of this handler

## Detailed Description

provides possibilities to send LogRecords to an arbitrary output channel.

See also
  XLogger

Since
  OOo 2.3

## Exported Interfaces

## ◆ ::com::sun::star::lang::XComponent

interface ::com::sun::star::lang::XComponent

allows life time control for the handler

Disposing the handler effectively means closing the channel to which the handler forwards the log records.

## Member Function Documentation

## ◆ flush()

void flush | ( |  | ) |

flushes all buffered output of the handler

Log handlers are allowed to buffer their output. Upon `flush` being called, they must flush all their buffers.

## ◆ publish()

boolean publish | ( | [in] LogRecord | Record | ) |

publish the given log record at the handler's output channel.

Returns
  `TRUE` if and only if the record was actually published. A handler will not publish a record if its log level doesn't meet the handler's log level, if the record is filtered, or if any other handler-specified restrictions apply.

## Member Data Documentation

## ◆ Encoding

string Encoding
| attribute

specifies MIME charset name for the encoding to be used by this handler

It depends on the concrete handler implementation whether or not this parameter is needed.

See also
  http://www.iana.org/assignments/character-sets

## ◆ Formatter

XLogFormatter Formatter
| attribute

specifies the formatter to be used by this handler.

## ◆ Level

long Level
| attribute

specifies the log level of this handler

Different handlers can have different log levels, which again might be different from the log level of the XLogger for which the handlers are used.

The documentation for this interface was generated from the following file:

- com/sun/star/logging/XLogHandler.idl