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 );
95 std::shared_ptr< EventLogger_Impl >
m_pImpl;
108 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
109 const char* _pAsciiLoggerName
114 bool isLoggable(
const sal_Int32 _nLogLevel )
const;
121 void log(
const sal_Int32 _nLogLevel,
const OUString& rMessage )
const
123 if ( isLoggable( _nLogLevel ) )
124 impl_log(_nLogLevel,
nullptr,
nullptr, rMessage);
127 const css::uno::Reference<css::logging::XLogger> & getLogger()
const;
136 template<
typename ARGTYPE1 >
137 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1 )
const
139 if ( isLoggable( _nLogLevel ) )
140 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
145 template<
typename ARGTYPE1,
typename ARGTYPE2 >
146 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
148 if ( isLoggable( _nLogLevel ) )
149 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
155 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
156 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
158 if ( isLoggable( _nLogLevel ) )
159 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
166 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
167 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
169 if ( isLoggable( _nLogLevel ) )
170 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
178 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
179 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 )
const
181 if ( isLoggable( _nLogLevel ) )
182 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
191 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
192 void log(
const sal_Int32 _nLogLevel,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 )
const
194 if ( isLoggable( _nLogLevel ) )
195 impl_log( _nLogLevel,
nullptr,
nullptr, _rMessage,
215 template<
typename ARGTYPE1 >
216 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1 )
const
218 if ( isLoggable( _nLogLevel ) )
219 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
224 template<
typename ARGTYPE1,
typename ARGTYPE2 >
225 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
227 if ( isLoggable( _nLogLevel ) )
228 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
234 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
235 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
237 if ( isLoggable( _nLogLevel ) )
238 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
245 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
246 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
248 if ( isLoggable( _nLogLevel ) )
249 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
257 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
258 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5 )
const
260 if ( isLoggable( _nLogLevel ) )
261 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
270 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
271 void log(
const sal_Int32 _nLogLevel,
const char* _pMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4, ARGTYPE5 _argument5, ARGTYPE6 _argument6 )
const
273 if ( isLoggable( _nLogLevel ) )
274 impl_log( _nLogLevel,
nullptr,
nullptr, OUString::createFromAscii( _pMessage ),
294 template<
typename ARGTYPE1 >
295 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1 )
const
297 if ( isLoggable( _nLogLevel ) )
298 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
303 template<
typename ARGTYPE1,
typename ARGTYPE2 >
304 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
306 if ( isLoggable( _nLogLevel ) )
307 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
313 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
314 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
316 if ( isLoggable( _nLogLevel ) )
317 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
324 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
325 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const OUString& _rMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
327 if ( isLoggable( _nLogLevel ) )
328 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
336 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
337 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
339 if ( isLoggable( _nLogLevel ) )
340 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
349 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
350 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
352 if ( isLoggable( _nLogLevel ) )
353 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, _rMessage,
373 template<
typename ARGTYPE1 >
374 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1 )
const
376 if ( isLoggable( _nLogLevel ) )
377 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
382 template<
typename ARGTYPE1,
typename ARGTYPE2 >
383 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2 )
const
385 if ( isLoggable( _nLogLevel ) )
386 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
392 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3 >
393 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3 )
const
395 if ( isLoggable( _nLogLevel ) )
396 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
403 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4 >
404 void logp(
const sal_Int32 _nLogLevel,
const char* _pSourceClass,
const char* _pSourceMethod,
const char* _pAsciiMessage, ARGTYPE1 _argument1, ARGTYPE2 _argument2, ARGTYPE3 _argument3, ARGTYPE4 _argument4 )
const
406 if ( isLoggable( _nLogLevel ) )
407 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
415 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5 >
416 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
418 if ( isLoggable( _nLogLevel ) )
419 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
428 template<
typename ARGTYPE1,
typename ARGTYPE2,
typename ARGTYPE3,
typename ARGTYPE4,
typename ARGTYPE5,
typename ARGTYPE6 >
429 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
431 if ( isLoggable( _nLogLevel ) )
432 impl_log( _nLogLevel, _pSourceClass, _pSourceMethod, OUString::createFromAscii( _pAsciiMessage ),
443 const sal_Int32 _nLogLevel,
444 const char* _pSourceClass,
445 const char* _pSourceMethod,
446 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