9 #ifndef MI_BASE_ILOGGER_H
10 #define MI_BASE_ILOGGER_H
40 class ILogger :
public
68 Interface_declare<0x4afbf19a,0x5fb7,0x4422,0xae,0x4b,0x25,0x13,0x06,0x2c,0x30,0x5f>
116 #ifdef MI_COMPILER_GCC
117 __attribute__((format(
printf, 4, 5)))
121 va_start( args, message);
123 #ifdef MI_COMPILER_MSC
124 vsnprintf_s( &buffer[0],
sizeof( buffer),
sizeof( buffer)-1, message, args);
126 vsnprintf( &buffer[0],
sizeof( buffer), message, args);
128 this->
message( level, module_category, &buffer[0]);
158 m_default_level( default_level),
160 m_module_category( module_category)
162 set_log_level( m_default_level);
166 ~Log_streambuf() throw()
187 m_logger->message( m_level, m_module_category.c_str(),
str().c_str());
189 m_level = m_default_level;
231 const char* module_category,
234 m_buffer( *this, logger, module_category ? module_category :
"APP:MAIN", default_level)
237 #if (__cplusplus >= 201402L)
238 this->
pword( get_index()) =
this;
255 m_buffer( *this, logger, module_category, default_level)
258 #if (__cplusplus >= 201402L)
259 this->
pword( get_index()) =
this;
275 #if (__cplusplus >= 201402L)
277 static int get_index()
287 Log_streambuf m_buffer;
299 template <
typename C,
typename T>
302 #if (__cplusplus >= 201402L)
303 if( ostream.
pword( Log_stream::get_index()) == &ostream)
318 template <
typename C,
typename T>
321 #if (__cplusplus >= 201402L)
322 if( ostream.
pword( Log_stream::get_index()) == &ostream)
337 template <
typename C,
typename T>
340 #if (__cplusplus >= 201402L)
341 if( ostream.
pword( Log_stream::get_index()) == &ostream)
356 template <
typename C,
typename T>
359 #if (__cplusplus >= 201402L)
360 if( ostream.
pword( Log_stream::get_index()) == &ostream)
375 template <
typename C,
typename T>
378 #if (__cplusplus >= 201402L)
379 if( ostream.
pword( Log_stream::get_index()) == &ostream)
394 template <
typename C,
typename T>
397 #if (__cplusplus >= 201402L)
398 if( ostream.
pword( Log_stream::get_index()) == &ostream)
410 #endif // MI_BASE_ILOGGER_H