20#ifndef INCLUDED_COMPHELPER_LOGGING_HXX
21#define INCLUDED_COMPHELPER_LOGGING_HXX
24#include <rtl/ustring.hxx>
41 namespace log::convert
50 return OUString::createFromAscii( _pAsciiValue );
94 std::shared_ptr< EventLogger_Impl >
m_pImpl;
107 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
108 const char* _pAsciiLoggerName
113 bool isLoggable(
const sal_Int32 _nLogLevel )
const;
120 void log(
const sal_Int32 _nLogLevel,
const OUString& rMessage )
const
122 if ( isLoggable( _nLogLevel ) )
123 impl_log(_nLogLevel,
nullptr,
nullptr, rMessage);
126 const css::uno::Reference<css::logging::XLogger> & getLogger()
const;
135 template<
typename ARGTYPE1 >
136 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1 )
const
138 if ( isLoggable( _nLogLevel ) )
139 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
144 template<
typename ARGTYPE1,
typename ARGTYPE2 >
145 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
147 if ( isLoggable( _nLogLevel ) )
148 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
154 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
155 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
157 if ( isLoggable( _nLogLevel ) )
158 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
165 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
166 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
168 if ( isLoggable( _nLogLevel ) )
169 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
177 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
178 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 )
const
180 if ( isLoggable( _nLogLevel ) )
181 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
190 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
191 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 )
const
193 if ( isLoggable( _nLogLevel ) )
194 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
214 template<
typename ARGTYPE1 >
215 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1 )
const
217 if ( isLoggable( _nLogLevel ) )
218 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
223 template<
typename ARGTYPE1,
typename ARGTYPE2 >
224 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
226 if ( isLoggable( _nLogLevel ) )
227 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
233 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
234 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
236 if ( isLoggable( _nLogLevel ) )
237 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
244 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
245 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
247 if ( isLoggable( _nLogLevel ) )
248 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
256 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
257 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 )
const
259 if ( isLoggable( _nLogLevel ) )
260 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
269 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
270 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 )
const
272 if ( isLoggable( _nLogLevel ) )
273 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
293 template<
typename ARGTYPE1 >
294 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1 )
const
296 if ( isLoggable( _nLogLevel ) )
297 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
302 template<
typename ARGTYPE1,
typename ARGTYPE2 >
303 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
305 if ( isLoggable( _nLogLevel ) )
306 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
312 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
313 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
315 if ( isLoggable( _nLogLevel ) )
316 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
323 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
324 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
326 if ( isLoggable( _nLogLevel ) )
327 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
335 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
336 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
338 if ( isLoggable( _nLogLevel ) )
339 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
348 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
349 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
351 if ( isLoggable( _nLogLevel ) )
352 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
372 template<
typename ARGTYPE1 >
373 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1 )
const
375 if ( isLoggable( _nLogLevel ) )
376 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
381 template<
typename ARGTYPE1,
typename ARGTYPE2 >
382 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
384 if ( isLoggable( _nLogLevel ) )
385 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
391 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
392 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
394 if ( isLoggable( _nLogLevel ) )
395 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
402 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
403 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
405 if ( isLoggable( _nLogLevel ) )
406 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
414 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
415 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
417 if ( isLoggable( _nLogLevel ) )
418 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
427 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
428 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
430 if ( isLoggable( _nLogLevel ) )
431 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
442 const sal_Int32 _nLogLevel,
443 const char* _pSourceClass,
444 const char* _pSourceMethod,
445 const OUString& _rMessage,
encapsulates a css::logging::XLogger
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
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
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
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
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
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
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
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
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
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
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
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
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
std::shared_ptr< EventLogger_Impl > m_pImpl
void log(const sal_Int32 _nLogLevel, const OUString &rMessage) const
logs a given message, without any arguments, or source class/method names
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
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
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
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
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
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
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
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
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
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
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
#define COMPHELPER_DLLPUBLIC
OUString convertLogArgToString(const Date &_rDate)
::std::optional< OUString > OptionalString