artefaktur
software engineer &        architecture

 
 
 
 

acdklogging

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

ACDK Logging classes/functions/macros


Detailed Description

See also:
 ACDK Unit Tests


Namespaces

namespace  acdk::util::logging
 Contains the logging framework.


Compounds

class  ConsoleConsumer
 Write the logs into the standard or error ouput console. More...

class  FileConsumer
 Writes LogRecord into a file. More...

class  Logger
 represend one logical logger A logger can have a hierarchical name and 0 - n consumers More...

class  LogManager
 central instance to manage logging. More...

class  LogRecord
 represend one logging entry/message. More...

class  NamedLogArgs
 Utility to support acdk::util::logging Used in the LOG_NPV, LOG_NPC and LOG_NPS macros. More...

class  NamedParameter
 wrapper to a named paramater for logging purpose. More...

class  SimpleFormatter
 Very simple format with only Category: Message output. More...

class  StdFormatter
 Standard format for LogRecord in one readable line per LogRecord. More...

class  TransactionConsumer
 The TransactionConsumer wrapps the logging into a transaction. More...

class  Win32DbgConsumer
 different to the name this consumer can also be used in other than win32 platforms. More...

class  Win32DbgFormatter
 This format for a log entry int Microsoft Studio compativle format. More...

class  WriterConsumer
 pass logs to a given writer in the standard encoding More...


Defines

#define ACDK_LOG(level, msg)
 Write a Log message to the root logger.

#define ACDK_ILOG(level, msg)
 Write a Log message to the root logger.

#define ACDK_LOGP(level, msg, namedargs)
 Write a Log message with named parameters to the root logger.

#define ACDK_ILOGP(level, msg, namedargs)
 Write a Log message with named parameters to the root logger.

#define ACDK_NLOG(name, level, msg)
 Write Log message to a named Logger.

#define ACDK_NxLOG(names, level, msg)
 Write Log message to to multiple Logger ACDK_MLOG((a, b), Info, asdf);.

#define ACDK_N2LOG(name1, name2, level, msg)   ACDK_NxLOG(((const char*)name1, (const char*)name2), level, msg)
 write log message in multiple logger

#define ACDK_N3LOG(name1, name2, name3, level, msg)   ACDK_NxLOG(((const char*)name1, (const char*)name2, (const char*)name3), level, msg)
 write log message in multiple logger

#define ACDK_INLOG(name, level, msg)
 Write Log message to a named Logger.

#define ACDK_NLOGP(name, level, msg, namedargs)
 Write a Log message with named parameters to the root logger.

#define ACDK_NxLOGP(names, level, msg, namedargs)
 Write Log message to to multiple Logger ACDK_MLOG((a, b), Info, asdf);.

#define ACDK_N2LOGP(name1, name2, level, msg, namedargs)   ACDK_NxLOGP(((const char*)name1, (const char*)name2), level, msg, namedargs)
 write log message in multiple logger

#define ACDK_N3LOGP(name1, name2, name3, level, msg, namedargs)   ACDK_NxLOGP(((const char*)name1, (const char*)name2, (const char*)name3), level, msg, namedargs)
 write log message in multiple logger

#define ACDK_INLOGP(name, level, msg, namedargs)
 Write a Log message with named parameters to the root logger.

#define LOG_NP(name, v)   ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(RCS(#name), ::acdk::lang::inOf(v)))
 alias to LOG_NPV(name, v)

#define LOG_NPV(name, v)   LOG_NP(name, v)
#define LOG_NPC(name, v)   ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(RCS(#name), LOG_NPS(v)))
#define LOG_SPC(name, v)   ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(name, LOG_NPS(v)))

Define Documentation

#define ACDK_ILOG level,
msg   ) 
 

Value:

do { \
if (::acdk::util::logging::LogManager::doLog(level) == true)  \
{ \
   ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getRootLogger())->doLog(level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
       _sb_internal << msg; \
      logger->log(level, Nil, _sb_internal.toString(), __FILE__, __LINE__); \
    } \
} \
} while (false)
Write a Log message to the root logger.

Parameters:
level int Value of acdk::util::logging::Level
msg String message

#define ACDK_ILOGP level,
msg,
namedargs   ) 
 

Value:

do { \
if (::acdk::util::logging::LogManager::doLog(level) == true)  \
{ \
  ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getLogger(name))->doLog(::level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      ::acdk::util::logging::LogManager::getRootLogger()->log(level, Nil, _sb_internal.toString(), LOG_NPS(namedargs), __FILE__, __LINE__); \
    } \
} \
} while (false)
Write a Log message with named parameters to the root logger.

Parameters:
level Value of acdk::util::logging::Level
msg String message
namedargs NamedArgs
See also:
NamedArgs

#define ACDK_INLOG name,
level,
msg   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(level) == true) { \
    ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getLogger(name))->doLog(level) == true) \
    { \
      logger->log(level, name, msg, __FILE__, __LINE__); \
    } \
  } \
} while (false)
Write Log message to a named Logger.

Parameters:
name Name of the Logger
level Value of acdk::util::logging::Level
msg String message

#define ACDK_INLOGP name,
level,
msg,
namedargs   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(level) == true) { \
    ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getLogger(name))->doLog(level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      logger->log(level, name, _sb_internal.toString(), namedargs, __FILE__, __LINE__); \
    } \
  } \
} while (false)
Write a Log message with named parameters to the root logger.

Parameters:
name Name of the Logger
level Value of acdk::util::logging::Level
msg String message
namedargs NamedArgs
See also:
NamedArgs

#define ACDK_LOG level,
msg   ) 
 

Value:

do { \
if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true)  \
{ \
    ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getRootLogger())->doLog(::acdk::util::logging::level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
       _sb_internal << msg; \
      logger->log(::acdk::util::logging::level, Nil, _sb_internal.toString(), __FILE__, __LINE__); \
    } \
} \
} while (false)
Write a Log message to the root logger.

Parameters:
level Value of acdk::util::logging::Level
msg String message

#define ACDK_LOGP level,
msg,
namedargs   ) 
 

Value:

do { \
if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true)  \
{ \
  ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getRootLogger())->doLog(::acdk::util::logging::level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      ::acdk::util::logging::LogManager::getRootLogger()->log(::acdk::util::logging::level, Nil, _sb_internal.toString(), LOG_NPS(namedargs), __FILE__, __LINE__); \
    } \
} \
} while (false)
Write a Log message with named parameters to the root logger.

Parameters:
level Value of acdk::util::logging::Level
msg String message
namedargs NamedArgs
See also:
NamedArgs

#define ACDK_N2LOG name1,
name2,
level,
msg   )     ACDK_NxLOG(((const char*)name1, (const char*)name2), level, msg)
 

write log message in multiple logger

#define ACDK_N2LOGP name1,
name2,
level,
msg,
namedargs   )     ACDK_NxLOGP(((const char*)name1, (const char*)name2), level, msg, namedargs)
 

write log message in multiple logger

#define ACDK_N3LOG name1,
name2,
name3,
level,
msg   )     ACDK_NxLOG(((const char*)name1, (const char*)name2, (const char*)name3), level, msg)
 

write log message in multiple logger

#define ACDK_N3LOGP name1,
name2,
name3,
level,
msg,
namedargs   )     ACDK_NxLOGP(((const char*)name1, (const char*)name2, (const char*)name3), level, msg, namedargs)
 

write log message in multiple logger

#define ACDK_NLOG name,
level,
msg   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true) { \
    ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getLogger(name))->doLog(::acdk::util::logging::level) == true) \
    { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      logger->log(::acdk::util::logging::level, name, _sb_internal.toString(), __FILE__, __LINE__); \
    } \
  } \
} while (false)
Write Log message to a named Logger.

Parameters:
name Name of the Logger
level Value of acdk::util::logging::Level
msg String message

#define ACDK_NLOGP name,
level,
msg,
namedargs   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true) { \
    ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
    ::acdk::util::logging::RLogger logger; \
    if ((logger = ::acdk::util::logging::LogManager::getLogger(name))->doLog(::acdk::util::logging::level) == true) \
    { \
      logger->log(::acdk::util::logging::level, name, msg, LOG_NPS(namedargs), __FILE__, __LINE__); \
    } \
  } \
} while (false)
Write a Log message with named parameters to the root logger.

Parameters:
name Name of the Logger
level Value of acdk::util::logging::Level
msg String message
namedargs NamedArgs
See also:
NamedArgs

#define ACDK_NxLOG names,
level,
msg   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true) { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      core_vector<const char*> _vec_internal = make_core_vector names; \
      ::acdk::util::logging::RLogger logger; \
      for (int _i_internal = 0; _i_internal < _vec_internal.size(); ++_i_internal) \
      { \
        if ((logger = ::acdk::util::logging::LogManager::getLogger(_vec_internal[_i_internal])))->doLog(::acdk::util::logging::level) == true) \
        { \
          logger->log(::acdk::util::logging::level, _vec_internal[_i_internal], _sb_internal.toString(), __FILE__, __LINE__); \
        } \
    } \
  } \
} while (false)
Write Log message to to multiple Logger ACDK_MLOG((a, b), Info, asdf);.

Parameters:
names list of Name of the Logger
level Value of acdk::util::logging::Level
msg String message

#define ACDK_NxLOGP names,
level,
msg,
namedargs   ) 
 

Value:

do { \
  if (::acdk::util::logging::LogManager::doLog(::acdk::util::logging::level) == true) { \
      ::acdk::lang::StringBuffer _sb_internal; \
      _sb_internal << msg; \
      core_vector<const char*> _vec_internal = make_core_vector names; \
    ::acdk::util::logging::RLogger logger; \
      NamedLogArgs _np_internal  << stream; \
      for (int _i_internal = 0; _i_internal < _vec_internal.size(); ++_i_internal) \
    { \
        if ((logger = ::acdk::util::logging::LogManager::getLogger(_vec_internal[_i_internal]))->doLog(::acdk::util::logging::level) == true) \
        { \
          logger->log(::acdk::util::logging::level, _vec_internal[_i_internal], _sb_internal.toString(), _np_internal,  __FILE__, __LINE__); \
        } \
    } \
  } \
} while (false)
Write Log message to to multiple Logger ACDK_MLOG((a, b), Info, asdf);.

Parameters:
names list of Name of the Logger
level Value of acdk::util::logging::Level
msg String message

#define LOG_NP name,
 )     ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(RCS(#name), ::acdk::lang::inOf(v)))
 

alias to LOG_NPV(name, v)

#define LOG_NPC name,
 )     ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(RCS(#name), LOG_NPS(v)))
 

Parameters:
name must be a identifier without spaces
v class instance, which supports the NamedLogArgs& operator<<(NamedLogArgs& nla, INP(Class) cls)

#define LOG_NPV name,
 )     LOG_NP(name, v)
 

Parameters:
name must be a identifier without spaces
v value

#define LOG_SPC name,
 )     ::acdk::util::logging::RNamedParameter(new ::acdk::util::logging::NamedParameter(name, LOG_NPS(v)))
 

Parameters:
name a string
v class instance, which supports the NamedLogArgs& operator<<(NamedLogArgs& nla, INP(Class) cls)
 
Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer