Type: info
         Title: ::comphelper::(ResourceBased)EventLogger
     Posted by: [EMAIL PROTECTED]
      Affected: -
Effective from: CWS sdblogging


*Summary*
--------
+ <comphelper/logging.hxx>
+ ::comphelper::EventLogger
+ ::comphelper::ResourceBasedEventLogger

*Description*
-------------
The class ::comphelper::EventLogger encapsulates an
::com::sun::star::logging::XLogger instance. The class silences
several (unlikely) errors which could potentially happen when working
with a logger. Additionally, it provides some convenience methods for
logging events.

You can use this class as follows
    EventLogger aLogger( xContext, sLoggerName );
    ....
    aLogger.log( LogLevel::SEVERE, sSomeMessage );
    aLogger.logp( LogLevel::CONFIG, "MyClass", "MyMethod",
      sSomeMessage, SomeParameter1, SomeParameter2,
      SomeParameter3 );

log and logp support up to 6 (arbitrarily typed) parameters, which are
substituted into the log message.


The class ::comphelper::ResourceBasedEventLogger extends EventLogger
in that it loads the messages from a resource file.


Both classes are cheap in that their log[p] calls first of all check
whether the given log level is really loggable by the logger, and
return immediately if not so.


For more information, please see the class/method documentation in the
header file.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to