LibreOffice Module comphelper (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
comphelper::EventLogger Class Reference

encapsulates a css::logging::XLogger More...

#include <logging.hxx>

Public Member Functions

 EventLogger (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const char *_pAsciiLoggerName)
 creates an EventLogger instance working with a css.logging.XLogger instance given by ASCII name. More...
 
bool isLoggable (const sal_Int32 _nLogLevel) const
 determines whether an event with the given level would be logged More...
 
void log (const sal_Int32 _nLogLevel, const OUString &rMessage) const
 logs a given message, without any arguments, or source class/method names More...
 
const css::uno::Reference< css::logging::XLogger > & getLogger () const
 
template<typename ARGTYPE1 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1) const
 logs a given message, replacing a placeholder in the message with an argument More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2) const
 logs a given message, replacing 2 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3) const
 logs a given message, replacing 3 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4) const
 logs a given message, replacing 4 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5) const
 logs a given message, replacing 5 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void log (const sal_Int32 _nLogLevel, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6) const
 logs a given message, replacing 6 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1) const
 logs a given message, replacing a placeholder in the message with an argument More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2) const
 logs a given message, replacing 2 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3) const
 logs a given message, replacing 3 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4) const
 logs a given message, replacing 4 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5) const
 logs a given message, replacing 5 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void log (const sal_Int32 _nLogLevel, const char *_pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6) const
 logs a given message, replacing 6 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1) const
 logs a given message, replacing a placeholder in the message with an argument More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2) const
 logs a given message, replacing 2 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3) const
 logs a given message, replacing 3 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4) const
 logs a given message, replacing 4 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5) const
 logs a given message, replacing 5 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6) const
 logs a given message, replacing 6 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1) const
 logs a given ASCII message, replacing a placeholder in the message with an argument More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2) const
 logs a given ASCII message, replacing 2 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3) const
 logs a given ASCII message, replacing 3 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4) const
 logs a given ASCII message, replacing 4 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5) const
 logs a given ASCII message, replacing 5 placeholders in the message with respective values More...
 
template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void logp (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const char *_pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6) const
 logs a given ASCII message, replacing 6 placeholders in the message with respective values More...
 

Protected Member Functions

void impl_log (const sal_Int32 _nLogLevel, const char *_pSourceClass, const char *_pSourceMethod, const OUString &_rMessage, const OptionalString &_rArgument1=OptionalString(), const OptionalString &_rArgument2=OptionalString(), const OptionalString &_rArgument3=OptionalString(), const OptionalString &_rArgument4=OptionalString(), const OptionalString &_rArgument5=OptionalString(), const OptionalString &_rArgument6=OptionalString()) const
 

Private Attributes

std::shared_ptr< EventLogger_Implm_pImpl
 

Detailed Description

encapsulates a css::logging::XLogger

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

   The <code>log</code> and <code>logp</code> calls support up to 6 parameters, which can be of
    arbitrary type. For every parameter, there must exist a function <code>convertLogArgToString</code>
    which takes an argument of the respective type, and returns a string.

    After a parameter has been converted to a string using the above mentioned
    <code>convertLogArgToString</code> function, a placeholder $1$ (resp. $2$ resp. $4$ ...)
    in the message will be replaced with this string, and the resulting message will be logged.

Definition at line 92 of file logging.hxx.

Constructor & Destructor Documentation

◆ EventLogger()

comphelper::EventLogger::EventLogger ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const char *  _pAsciiLoggerName 
)

creates an EventLogger instance working with a css.logging.XLogger instance given by ASCII name.

Parameters
_rxContextthe component context to create services
_rLoggerNamethe ASCII name of the logger to create.

Definition at line 69 of file logging.cxx.

References m_pImpl, and make_shared().

Member Function Documentation

◆ getLogger()

const css::uno::Reference< css::logging::XLogger > & comphelper::EventLogger::getLogger ( ) const

Definition at line 91 of file logging.cxx.

References m_pImpl.

◆ impl_log()

void comphelper::EventLogger::impl_log ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
const OptionalString _rArgument1 = OptionalString(),
const OptionalString _rArgument2 = OptionalString(),
const OptionalString _rArgument3 = OptionalString(),
const OptionalString _rArgument4 = OptionalString(),
const OptionalString _rArgument5 = OptionalString(),
const OptionalString _rArgument6 = OptionalString() 
) const
protected

Definition at line 111 of file logging.cxx.

References Exception, m_pImpl, sMessage, and TOOLS_WARN_EXCEPTION.

◆ isLoggable()

bool comphelper::EventLogger::isLoggable ( const sal_Int32  _nLogLevel) const

determines whether an event with the given level would be logged

Definition at line 74 of file logging.cxx.

References Exception, m_pImpl, and TOOLS_WARN_EXCEPTION.

◆ log() [1/13]

template<typename ARGTYPE1 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1 
) const
inline

logs a given message, replacing a placeholder in the message with an argument

The function takes, additionally to the log level and the message, an arbitrary argument. This argument is converted to a string using an overloaded function named convertLogArgToString. Then, a placeholder "$1$" is searched in the message string, and replaced with the argument string.

Definition at line 215 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [2/13]

template<typename ARGTYPE1 , typename ARGTYPE2 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2 
) const
inline

logs a given message, replacing 2 placeholders in the message with respective values

Definition at line 224 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [3/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3 
) const
inline

logs a given message, replacing 3 placeholders in the message with respective values

Definition at line 234 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [4/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4 
) const
inline

logs a given message, replacing 4 placeholders in the message with respective values

Definition at line 245 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [5/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5 
) const
inline

logs a given message, replacing 5 placeholders in the message with respective values

Definition at line 257 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [6/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const char *  _pMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5,
ARGTYPE6  _argument6 
) const
inline

logs a given message, replacing 6 placeholders in the message with respective values

Definition at line 270 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [7/13]

template<typename ARGTYPE1 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1 
) const
inline

logs a given message, replacing a placeholder in the message with an argument

The function takes, additionally to the log level and the message, an arbitrary argument. This argument is converted to a string using an overloaded function named convertLogArgToString. Then, a placeholder "$1$" is searched in the message string, and replaced with the argument string.

Definition at line 136 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [8/13]

template<typename ARGTYPE1 , typename ARGTYPE2 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2 
) const
inline

logs a given message, replacing 2 placeholders in the message with respective values

Definition at line 145 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [9/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3 
) const
inline

logs a given message, replacing 3 placeholders in the message with respective values

Definition at line 155 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [10/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4 
) const
inline

logs a given message, replacing 4 placeholders in the message with respective values

Definition at line 166 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [11/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5 
) const
inline

logs a given message, replacing 5 placeholders in the message with respective values

Definition at line 178 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [12/13]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5,
ARGTYPE6  _argument6 
) const
inline

logs a given message, replacing 6 placeholders in the message with respective values

Definition at line 191 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ log() [13/13]

void comphelper::EventLogger::log ( const sal_Int32  _nLogLevel,
const OUString &  rMessage 
) const
inline

logs a given message, without any arguments, or source class/method names

Definition at line 120 of file logging.hxx.

◆ logp() [1/12]

template<typename ARGTYPE1 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1 
) const
inline

logs a given ASCII message, replacing a placeholder in the message with an argument

The function takes, additionally to the logp level and the message, an arbitrary argument. This argument is converted to a string using an overloaded function named convertLogArgToString. Then, a placeholder "$1$" is searched in the message string, and replaced with the argument string.

Definition at line 373 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [2/12]

template<typename ARGTYPE1 , typename ARGTYPE2 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2 
) const
inline

logs a given ASCII message, replacing 2 placeholders in the message with respective values

Definition at line 382 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [3/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3 
) const
inline

logs a given ASCII message, replacing 3 placeholders in the message with respective values

Definition at line 392 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [4/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4 
) const
inline

logs a given ASCII message, replacing 4 placeholders in the message with respective values

Definition at line 403 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [5/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5 
) const
inline

logs a given ASCII message, replacing 5 placeholders in the message with respective values

Definition at line 415 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [6/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const char *  _pAsciiMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5,
ARGTYPE6  _argument6 
) const
inline

logs a given ASCII message, replacing 6 placeholders in the message with respective values

Definition at line 428 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [7/12]

template<typename ARGTYPE1 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1 
) const
inline

logs a given message, replacing a placeholder in the message with an argument

The function takes, additionally to the logp level and the message, an arbitrary argument. This argument is converted to a string using an overloaded function named convertLogArgToString. Then, a placeholder "$1$" is searched in the message string, and replaced with the argument string.

Definition at line 294 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [8/12]

template<typename ARGTYPE1 , typename ARGTYPE2 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2 
) const
inline

logs a given message, replacing 2 placeholders in the message with respective values

Definition at line 303 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [9/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3 
) const
inline

logs a given message, replacing 3 placeholders in the message with respective values

Definition at line 313 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [10/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4 
) const
inline

logs a given message, replacing 4 placeholders in the message with respective values

Definition at line 324 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [11/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5 
) const
inline

logs a given message, replacing 5 placeholders in the message with respective values

Definition at line 336 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

◆ logp() [12/12]

template<typename ARGTYPE1 , typename ARGTYPE2 , typename ARGTYPE3 , typename ARGTYPE4 , typename ARGTYPE5 , typename ARGTYPE6 >
void comphelper::EventLogger::logp ( const sal_Int32  _nLogLevel,
const char *  _pSourceClass,
const char *  _pSourceMethod,
const OUString &  _rMessage,
ARGTYPE1  _argument1,
ARGTYPE2  _argument2,
ARGTYPE3  _argument3,
ARGTYPE4  _argument4,
ARGTYPE5  _argument5,
ARGTYPE6  _argument6 
) const
inline

logs a given message, replacing 6 placeholders in the message with respective values

Definition at line 349 of file logging.hxx.

References comphelper::log::convert::convertLogArgToString().

Member Data Documentation

◆ m_pImpl

std::shared_ptr< EventLogger_Impl > comphelper::EventLogger::m_pImpl
private

Definition at line 94 of file logging.hxx.

Referenced by getLogger(), impl_log(), and isLoggable().


The documentation for this class was generated from the following files: