FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
FARGOS Logging API

High-performance multi-threaded logging APIs that support both textual and binary output. More...

Classes

struct  LogSubsystemInfo
 Descriptive meta-data for log file-related information. More...
 
struct  LogLineBinaryValueHeader
 Header record for a binary output log line. More...
 
struct  LogLineBinaryValue
 Represents a single binary log element. More...
 
struct  LogLineBinaryHeader
 Header for encoded log line template and arguments. More...
 
struct  StringInROM_struct
 Structure defined to generate unique type name. More...
 
class  TextBlock_struct
 Placeholder structure to reference a text fragment. More...
 
class  Escaped_Replacement_Characters
 Structure to hold table of characters that should be replaced or deleted. More...
 
class  EscapedTextBlock_struct
 Placeholder structure to reference a text fragment that will have selected characters transformed or deleted. More...
 
class  BinaryBlock_struct
 Placeholder structure to reference a block of arbitrary data. More...
 
class  HexadecimalBlock_struct
 Placeholder structure to reference a block of arbitrary data to be output in hexadecimal. More...
 
class  LogManager
 Implements multi-threaded, deferred physical I/O log file manager. More...
 
class  AutoRegisterLogComponent
 Convenience mechanism to automatically register a log component. More...
 
class  LogMessageRecord
 Log message record used to remember output format and argument values, potentially deferring formatting to a later point in time or by an external process. More...
 
class  AutoRegisterLogLevelName
 Convenience mechanism to automatically register a log level command line flag definition. More...
 
class  ReplumbAndLog
 Intercept output to an existing file descriptor by taking ownership of its destination, examining all data written to that descriptor, and possibly modifying it before sending it on to the originally intended output destination. More...
 

Macros

#define USE_GETTID_FOR_THREADID   0
 Permits use of gettid() rather than pthread_self() for thread Id on Linux. More...
 
#define COMPILE_DEBUG_LEVEL   ~0
 
#define DEFAULT_LOG_DIRECTORY_ENVIRONMENT_VARIABLE   "LOGDIR"
 
#define LOGFILE_BFR_MAGIC_NUMBER   "LOGCBFR"
 Magic number for shared memory log file buffer. More...
 
#define SiR(x)   ((StringInROM) (x))
 Very short macro to encapsulate content intended to be flagged as "permanent" String-in-ROM text. More...
 
#define _DEFAULT_ESCAPED_CHARACTERS   "\"\n\r\t\b\\"
 Default set of characters to be escaped by EscapedTextBlock_struct. More...
 
#define _DEFAULT_REPLACEMENT_CHARACTERS   "\\\"\0\\n\0\\r\0\\t\0\\b\0\\\\\0"
 Default replacement characters for EscapedTextBlock_struct. More...
 
#define _DEFAULT_NULL_REPLACEMENT   "\\0"
 Default replacement for null character by EscapedTextBlock_struct. More...
 
#define SUGGESTED_DEFAULT_MAX_LOG_LINES   1024
 Recommended default amount of maximum buffered log lines. More...
 
#define _ADD_NEW_LOG_ARG(typeEnum, member)
 
#define _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN(typeEnum, member, val, len)
 
#define __EXPLICIT_LOG_MESSAGE_BODY
 Allow message to be built up using the << operator. More...
 
#define AS_TEXT_BUFFER(s, ...)   TextBlock_struct(s,__VA_ARGS__)
 Convenience label to enable passing text with known length to output operator<<(). More...
 
#define AS_ESCAPED_TEXT_BUFFER(...)   EscapedTextBlock_struct(__VA_ARGS__)
 Convenience label to enable passing text with known length to output operator<<(). More...
 
#define AS_ESCAPED_TEXT_CHARACTER(...)   EscapedTextBlock_struct(__VA_ARGS__)
 Convenience label to enable passing a single character to output operator<<(). More...
 
#define AS_BINARY_BUFFER(d, l)   BinaryBlock_struct(d,l)
 Convenience label to enable passing buffer with known length to output operator<<(). More...
 
#define AS_HEXADECIMAL_BUFFER(d, ...)   HexadecimalBlock_struct(d,__VA_ARGS__)
 Convenience label to enable passing buffer with known length to output operator<<() but output the bytes as hexadecimal characters. More...
 
#define _LOGAPI_APPEND_TOKEN(component, suffix)   component ## suffix
 
#define LOGAPI_APPEND_TOKEN(component, suffix)   _LOGAPI_APPEND_TOKEN(component,suffix)
 Concatenate two tokens together to create new variable name. More...
 
#define COMPONENT_LOG_MASK(component)   LOGAPI_APPEND_TOKEN(component,_logLevelMask)
 Construct variable name for a component's active log mask. More...
 
#define THIS_COMPONENT_LOG_MASK   COMPONENT_LOG_MASK(THIS_COMPONENT)
 Construct variable name for the default component's active log mask. More...
 
#define ISABLE_ALL_LOG_MASK   0
 Master compile-time log-message disable mask. More...
 
#define DISABLE_COMPONENT_LOG_MASK(component)   LOGAPI_APPEND_TOKEN(ISABLE_, LOGAPI_APPEND_TOKEN(component,_logMask))
 Defines the name of a component-specific compile-time log message disable mask. More...
 
#define COMPONENT_LOG_ENABLED(component, mask)   OME_EXPECT( ( ((mask & LOGAPI_APPEND_TOKEN(component,_disableMask)) == 0 ) && (((uint32_t)(COMPONENT_LOG_MASK(component)) & (mask & ~LogMessageRecord::AND_SPECIAL_MASK)) == (mask & ~LogMessageRecord::AND_SPECIAL_MASK)) ), (static_cast<uint_fast32_t>(mask) & static_cast<uint_fast32_t>(LogMessageRecord::LOG_SEVERITY_DEBUG | LogMessageRecord::LOG_SEVERITY_TRACE | LogMessageRecord::LOG_SEVERITY_USER)) )
 Boolean expression to determine if component's active log mask has enabled at least one of the indicated levels. More...
 
#define _COMPONENT_LEVEL(component, level)   component ## _ ## level
 
#define COMPONENT_LEVEL(component, level)   _COMPONENT_LEVEL(component, level)
 Compose a symbolic log mask name for a component and level. More...
 
#define THIS_COMPONENT_LEVEL(level)   COMPONENT_LEVEL(THIS_COMPONENT, level)
 Compose a symbolic log mask name for the default component and level. More...
 
#define ENABLE_COMPONENT_LOG_LEVEL(component, level)   COMPONENT_LOG_MASK(component) = (uint32_t) COMPONENT_LOG_MASK(component) | COMPONENT_LEVEL(component,level)
 Enable a symbolic log level for a component. More...
 
#define DISABLE_COMPONENT_LOG_LEVEL(component, level)   COMPONENT_LOG_MASK(component) = (uint32_t) COMPONENT_LOG_MASK(component) & ~ COMPONENT_LEVEL(component,level)
 Disable a symbolic log level for a component. More...
 
#define COMPONENT_USER_LEVEL(component, baseLevel, N)   (COMPONENT_LEVEL(component, baseLevel) | (COMPONENT_LEVEL(component, user) * (1 << N)))
 Generate compile-time constant representing a user-specific log level for a component. More...
 
#define THIS_COMPONENT_USER_LEVEL(baseLevel, N)   COMPONENT_USER_LEVEL(THIS_COMPONENT, baseLevel, N)
 Convenience macro that uses COMPONENT_USER_LEVEL() with THIS_COMPONENT as the component argument. More...
 
#define DECLARE_COMPONENT_USER_LOG_MASK(component, name, baseLevel, N)   enum { COMPONENT_LEVEL(component, name) = COMPONENT_USER_LEVEL(component,baseLevel,N) }
 Declare a user-specific log mask name. More...
 
#define _DEFINE_COMPONENT_LOG_MASKS(component)
 Define default symbolic log mask names for a component, providing one level of macro expansion. More...
 
#define DEFINE_COMPONENT_LOG_MASKS(component)   _DEFINE_COMPONENT_LOG_MASKS(component)
 Define default symbolic log mask names for a component. More...
 
#define AUTO_REGISTER_USER_LOG_MASK(component, name, label)   static AutoRegisterLogLevelName LOGAPI_APPEND_TOKEN(autoRegFlag,LOGAPI_APPEND_TOKEN(component,name))(__LOGAPI_EXPAND_STRING2(name),COMPONENT_LEVEL(component,name),((COMPONENT_LEVEL(component,name) & COMPONENT_LEVEL(component,basicLevels)) ? 0 : label))
 Automatically register a user-specific log mask name with the command line parser. More...
 
#define DEFINE_COMPONENT_USER_LOG_MASK(component, name, baseLevel, N, label)   DECLARE_COMPONENT_USER_LOG_MASK(component,name,baseLevel,N); AUTO_REGISTER_USER_LOG_MASK(component,name,label)
 Define and automatically register a user-specific log mask for a component using DECLARE_COMPONENT_USER_LOG_MASK(), and AUTO_REGISTER_USER_LOG_MASK(). More...
 
#define _DECLARE_STANDARD_COMPONENT_VARS(component)
 Declare active log mask variable for a component and standard symbolic log level names, providing one level of macro expansion. More...
 
#define DECLARE_STANDARD_COMPONENT_VARS(component)   _DECLARE_STANDARD_COMPONENT_VARS(component)
 Declare active log mask variable for a component and its standard symbolic log level names. More...
 
#define _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component, maskValue)
 Define active log mask for a component, providing one level of macro expansion. More...
 
#define DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component, maskValue)   _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component,maskValue)
 Define the active log mask variable for a component and its default log mask value. Used in situations where the bitmask value itself is provided, rather than a symbolic log level name. More...
 
#define DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT(component, defaultMaskName)   _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component,COMPONENT_LEVEL(component,defaultMaskName))
 Define the active log mask variable for a component and its default mask value using a symbolic log level name. More...
 
#define DEFINE_STANDARD_COMPONENT_VARS(component)   DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT(component,defaultMask)
 Define active log mask variable for a component. The default mask value is determined by the component's defaultMask symbolic log level name. More...
 
#define DEFINE_STANDARD_VARS_FOR_THIS_COMPONENT()   DEFINE_STANDARD_COMPONENT_VARS(THIS_COMPONENT)
 Define the active log mask variable for the default component. More...
 
#define __LOGAPI_EXPAND_STRING1(x)   #x
 
#define __LOGAPI_EXPAND_STRING2(x)   __LOGAPI_EXPAND_STRING1(x)
 
#define THIS_COMPONENT_AS_STRING   __LOGAPI_EXPAND_STRING2(THIS_COMPONENT)
 Provides the value of THIS_COMPONENT as a text string or const char[] value. More...
 
#define AUTO_REGISTER_COMPONENT(componentName)   static AutoRegisterLogComponent LOGAPI_APPEND_TOKEN(autoReg_,componentName) (COMPONENT_LOG_MASK(componentName), __LOGAPI_EXPAND_STRING2(componentName), LOGAPI_APPEND_TOKEN(componentName,_defaultMask));
 Automatically register a component's active log mask variable with the command line parser. More...
 
#define AUTO_REGISTER_THIS_COMPONENT()   AUTO_REGISTER_COMPONENT(THIS_COMPONENT);
 Automatically register default component's active log mask variable with the command line parser by invoking AUTO_REGISTER_COMPONENT() with THIS_COMPONENT. More...
 
#define PROCESS_COMMANDLINE_LOG_FLAGS(argc, argv)   LogMessageRecord::process_commandline_log_flags(&default_LogSubsystemInfo, argc, argv, &argc, argv)
 Standard mechanism to process logging-related command line arguments. More...
 
#define _INIT_AND_OPEN_STANDARD_LOG(argc, argv, component, newArgc, newArgv)   LogManager::initializeLogSubsystem(newArgc,newArgv,argc, argv, #component , & COMPONENT_LOG_MASK(component)); LogManager::newStandardLogFile()
 Initialize and open standard log file for a component, providing one level of macro expansion. More...
 
#define _STDIN_FD   0
 Platform-independent reference to standard in. More...
 
#define _STDOUT_FD   1
 Platform-independent reference to standard out. More...
 
#define _STDERR_FD   2
 Platform-independent reference to standard error. More...
 
#define _INVALID_DESCRIPTOR   -1
 Platform-independent reference to invalid descriptor. More...
 
#define THIS_COMPONENT_LOG_MANAGER   LogManager::DEFAULT_LogManager
 Defines the default log manager object for the component. More...
 
#define LOG_STREAM_OBJECT(n)
 Instantiates a LogMessageRecord object suitable for use as a ostringstream-like buffer. More...
 
#define FORMAT_LOG_BUFFER(_var, src)
 Format a log buffer and return its address. More...
 
#define RELEASE_LOG_BUFFER(src)   src.getLogManager()->getBufferManager()->returnBlock(_bRec); } while (0)
 Release a log buffer formatted by FORMAT_LOG_BUFFER() More...
 
#define APPEND_LOG_BUFFER(dest, src)
 Append log line data constructed from one LogMessageRecord object into another. More...
 
#define _INIT_WITH_STANDARD_OUT(argc, argv, component, newArgc, newArgv)   LogManager::initializeLogSubsystem(newArgc,newArgv,argc, argv, #component , & COMPONENT_LOG_MASK(component)); SharedMemoryVariableNode _logNamingRoot(#component); THIS_COMPONENT_LOG_MANAGER = LogManager::newLogToFileDescriptor(&_logNamingRoot, _STDOUT_FD, default_LogSubsystemInfo.defaultLogPrefix, default_LogSubsystemInfo.useThreads, 0, default_LogSubsystemInfo.maxPendingLogLines * LogManager::MAX_LOG_LINE_LENGTH)
 Initialize and use standard out as log device for a component, providing one level of macro expansion. More...
 
#define _SET_LOGMGR_FOR(output)   SharedMemoryVariableNode _logNamingRoot ## output(#output); LogManager:: output ## _LogManager = LogManager::newLogToFileDescriptor(&_logNamingRoot ## output, _ ## output ## _FD, default_LogSubsystemInfo.defaultLogPrefix, default_LogSubsystemInfo.useThreads, 0, default_LogSubsystemInfo.maxPendingLogLines * LogManager::MAX_LOG_LINE_LENGTH);
 Create log manager for STDOUT or STDERR. More...
 
#define INIT_STANDARD_LOG_FOR_COMPONENT(argc, argv, appName, newArgc, newArgv)   _INIT_AND_OPEN_STANDARD_LOG(argc,argv,appName,newArgc,newArgv)
 Initialize the logging subsystem and create the default log file for an application. More...
 
#define INIT_STANDARD_LOG_FOR_THIS_COMPONENT(argc, argv, newArgc, newArgv)   INIT_STANDARD_LOG_FOR_COMPONENT(argc,argv,THIS_COMPONENT,newArgc,newArgv)
 Initialize the logging subsystem and create the default log file using the component name provided by THIS_COMPONENT. More...
 
#define ALWAYS_EMIT_MESSAGE_TO_LOG(logHandle, mask)
 Create LogMessageRecord context for content that will always be emitted to indicated log manager. The active log mask variable has no control over such content. More...
 
#define ALWAYS_EMIT_MESSAGE(lvl)   ALWAYS_EMIT_MESSAGE_TO_LOG(THIS_COMPONENT_LOG_MANAGER, THIS_COMPONENT_LEVEL(lvl))
 Create LogMessageRecord context for content that will always be emitted to default log manager. The active log mask variable has no control over such content. More...
 
#define EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(component, mask, log)   if (COMPONENT_LOG_ENABLED(component,mask)) ALWAYS_EMIT_MESSAGE_TO_LOG(log,mask)
 Create LogMessageRecord context for content that will be emitted to the indicated log manager only if enabled by the component's active log mask variable. More...
 
#define EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT(component, lvl)   EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(component,COMPONENT_LEVEL(component,lvl),THIS_COMPONENT_LOG_MANAGER)
 Create LogMessageRecord context for content that will be emitted to the default log manager only if enabled by the corresponding component's active log mask variable. More...
 
#define EMIT_CONDITIONAL_MESSAGE(lvl)   EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT(THIS_COMPONENT,lvl)
 Create LogMessageRecord context for content that will be emitted to the default log manager only if enabled by the default component's active log mask variable. More...
 
#define LOG_MESSAGE_FORMAT(s)   logObj.setLogFormat(s);
 Used to denote the log message format. More...
 
#define LOG_ARG(arg)   addLogArg(logObj, arg);
 Used to denote an argument for the log message. More...
 
#define LOG_BINARY_ARG(arg, len)   addLogArg(logObj, arg,len);
 Used to denote an binary buffer argument for the log message. More...
 
#define LOG_ARG_USING_BUFFER(arg, bfr, bfrLen)   addLogArg(logObj, arg, bfr, bfrLen)
 Used to denote an argument that requires a temporary buffer to permit the content to be formatted. More...
 
#define AS_PLAIN_TEXT   logObj.writeAsTextToBuffer(0); } while (0)
 Closing clause to emit log message record as unadorned text. More...
 
#define AS_TIMESTAMPED_TEXT   logObj.writeAsTextToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)
 Closing clause to emit log message record as text prefixed with an appropriate timestamp and other information. This is the preferred mechanism. More...
 
#define AS_PREFIXED_TEXT(selectionMask)   logObj.writeAsTextToBuffer(selectionMask); } while (0)
 Closing clause to emit log message record as text prefixed with arbitrarily selected fields. More...
 
#define AS_BINARY_RECORD   logObj.writeAsBinaryToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)
 Closing clause to emit log message record as a binary record. More...
 
#define WITH_DATE_TIME_LEVEL   logObj.writeAsTextToBuffer( LogMessageRecord::LOG_DATESTAMP | LogMessageRecord::LOG_TIMESTAMP | LogMessageRecord::LOG_ERROR_LEVEL); } while (0)
 log as $date_time $log_level $msg More...
 
#define WITH_TIME_LEVEL   logObj.writeAsTextToBuffer(LogMessageRecord::LOG_TIMESTAMP | LogMessageRecord::LOG_ERROR_LEVEL); } while (0)
 log as $time $log_level $msg More...
 
#define LOG_WHEN_OSTREAM(stream, lvl)   if (COMPONENT_LOG_ENABLED(THIS_COMPONENT,THIS_COMPONENT_LEVEL(lvl))) do { stream
 Convenience macro for conditional log output using a std::ostream or allomorphic equivalent. More...
 
#define OSTREAM_ENDLINE   "\n"; } while (0)
 End-of-Line fragment for use with LOG_WHEN_OSTREAM. More...
 
#define LOG_TO_DESCRIPTOR(output, lvl)   EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(THIS_COMPONENT,lvl,output ## _LogManager)
 Convenience macro to emit conditional message for THIS_COMPONENT via a LogManager associated with standard output or error. More...
 
#define LOG_ALWAYS(lvl)   ALWAYS_EMIT_MESSAGE(lvl); logObj
 Convenience declaration for log line that will be always be emitted for the default component to the default log manager. More...
 
#define IFLOG_ALWAYS(lvl)   if (THIS_COMPONENT_LOG_MANAGER != nullptr) ALWAYS_EMIT_MESSAGE(lvl); logObj
 Convenience declaration for log line that will always be emitted for the default component if the default log manager has been initialized. More...
 
#define LOG_WHEN(lvl)   EMIT_CONDITIONAL_MESSAGE(lvl); logObj
 Convenience declaration for log line that will be conditionally emitted for the default component to the default log manager if the indicated log level is enabled. More...
 
#define IFLOG_WHEN(lvl)   if (THIS_COMPONENT_LOG_MANAGER != nullptr) EMIT_CONDITIONAL_MESSAGE(lvl); logObj
 Convenience declaration for log line that will be conditionally emitted for the default component if the default log manager has been initialized and the indicate log level is enabled. More...
 
#define ENDREC   "\n"; logObj.writeAsTextToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)
 Closing attribute to complete a LOG_ALWAYS() or LOG_WHEN() statement and emit the log message as a text line. The result will be subject to the LogManager object's current prefix mask, which might inhibit the output of elements such as the date, thread id, file name, source line number, etc. More...
 
#define BINARY_ENDREC   "\n"; logObj.writeAsBinaryToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)
 Closing attribute to complete LOG_ALWAYS() or LOG_WHEN statement and emit the log message as a binary record. More...
 
#define LOG_ENDLINE   ENDREC
 Closing clause for text line output using << operators. More...
 
#define BINARY_LOG_ENDLINE   BINARY_ENDREC
 Closing close for binary record output using << operators. More...
 
#define LOG_COMPONENT_INTO(mgrPtr, component, lvl)   EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(component,COMPONENT_LEVEL(component,lvl),mgrPtr); logObj
 Conditionally emits a log message constructed using the << operator. The end of line should be terminated with either LOG_ENDLINE or BINARY_LOG_ENDLINE. More...
 
#define LOG_COMPONENT_ALWAYS_INTO(mgrPtr, component, lvl)   ALWAYS_EMIT_MESSAGE_TO_LOG(mgrPtr,COMPONENT_LEVEL(component,lvl)); logObj
 Always emits a log message constructed using the << operator. The end of line should be terminated with either LOG_ENDLINE or BINARY_LOG_ENDLINE. More...
 
#define LOG_INTO(mgrPtr, lvl)   LOG_COMPONENT_INTO(mgrPtr,THIS_COMPONENT,lvl)
 Convenience macro that uses LOG_COMPONENT_INTO to conditionally emit a message associated with THIS_COMPONENT. More...
 
#define LOG_ALWAYS_INTO(mgrPtr, lvl)   LOG_COMPONENT_ALWAYS_INTO(mgrPtr,THIS_COMPONENT,lvl)
 Convenience macro that uses LOG_COMPONENT_INTO to emit a message associated with THIS_COMPONENT. More...
 
#define LOG_COUT(lvl)   LOG_INTO(LogManager::STDOUT_LogManager, lvl)
 Convenience macro that uses LOG_INTO() to conditionally log a message to standard output. More...
 
#define LOG_CERR(lvl)   LOG_INTO(LogManager::STDERR_LogManager, lvl)
 Convenience macro that uses LOG_INTO() to conditionally log a message to standard error. More...
 
#define LOG_COMPONENT_COUT(component, lvl)   LOG_COMPONENT_INTO(LogManager::STDOUT_LogManager,component,lvl)
 Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to standard output. More...
 
#define LOG_COMPONENT_CERR(component, lvl)   LOG_COMPONENT_INTO(LogManager::STDERR_LogManager,component,lvl)
 Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to standard error. More...
 
#define LOG_COMPONENT(component, lvl)   LOG_COMPONENT_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)
 Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to the default log manager, which is in turn specified by the THIS_COMPONENT_LOG_MANAGER macro. More...
 
#define LOG_COMPONENT_ALWAYS(component, lvl)   LOG_COMPONENT_ALWAYS_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)
 Convenience macro that uses LOG_COMPONENT_ALWAYS_INTO to log a message to the default log manager, which is in turn specified by the THIS_COMPONENT_LOG_MANAGER macro. More...
 
#define IFLOG_COMPONENT(component, lvl)   if (OME_EXPECT_TRUE(THIS_COMPONENT_LOG_MANAGER != nullptr)) LOG_COMPONENT_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)
 Only if the default log manager has been created, uses the LogManager specified by the THIS_COMPONENT_LOG_MANAGER macro to conditionally emit a log message. More...
 
#define IFLOG_COMPONENT_ALWAYS(component, lvl)   if (OME_EXPECT_TRUE(THIS_COMPONENT_LOG_MANAGER != nullptr)) ALWAYS_EMIT_MESSAGE_TO_LOG(THIS_COMPONENT_LOG_MANAGER,COMPONENT_LEVEL(component,lvl)); logObj
 Similiar to IFLOG_COMPONENT(), but the message cannot be disabled using the component's logLevel mask. More...
 
#define SPLIT_ACROSS_LINES(label, ...)
 Label a block of text that is split across multiple log lines. More...
 
#define _OUTPUT_MEMBER_FIELD(s, f)   << " " #f "=" << (s). ## f
 Convenience macro to output a member field. More...
 
#define _OUTPUT_MEMBER_FIELD_AS_STRING_BLOCK(s, f, l)   << " " #f "=\"" << AS_ESCAPED_TEXT_BUFFER((s). ## f, l) << "\""
 Convenience macro to output a member field as a string. More...
 
#define _OUTPUT_MEMBER_FIELD_AS_STRING(s, f)   _OUTPUT_MEMBER_FIELD_AS_STRING_BLOCK(s,f,strlen((s). ## f))
 Convenience macro to output a member field as a string, with the length determined at runtime. More...
 

Typedefs

typedef uint_fast32_t LogMaskPrimitiveType_t
 
typedef SMV_StandaloneNumeric< LogMaskPrimitiveType_tLogMaskType_t
 
typedef const struct StringInROM_structStringInROM
 Typedef to mark string data in text segment. More...
 

Enumerations

enum  { LOG_LINE_BINARY_FORMAT_VER1 = '1', LOG_LINE_BINARY_FORMAT_LE = 'L', LOG_LINE_BINARY_FORMAT_BE = 'B', LOG_LINE_BINARY_FORMAT_BE_S360 = 'I' }
 

Functions

void addLogArg (LogMessageRecord &logRec, const int32_t arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const uint32_t arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const int64_t arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const uint64_t arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const size_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
void addLogArg (LogMessageRecord &logRec, const ssize_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
void addLogArg (LogMessageRecord &logRec, const float arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const double arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const char arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const POSIXtimeInNanoseconds arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const char *arg)
 Add text string argument. More...
 
void addLogArg (LogMessageRecord &logRec, StringInROM arg)
 Add text string data which is expected to be permanently available. More...
 
void addLogArg (LogMessageRecord &logRec, const void *arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, const std::string &arg)
 Add log argument of indicated type. More...
 
void addLogArg (LogMessageRecord &logRec, uint_fast32_t len, const char *arg)
 Add text string argument with known length. More...
 
void addLogArg (LogMessageRecord &logRec, const void *arg, const size_t l)
 Add log argument representing a pointer. More...
 
void addLogArg (LogMessageRecord &logRec, const TextBlock_struct &arg)
 Add text string argument with known length. More...
 
void addLogArg (LogMessageRecord &logRec, const BinaryBlock_struct &arg)
 Add binary string argument with known length. More...
 
void addLogArg (LogMessageRecord &logRec, const HexadecimalBlock_struct &arg)
 Add binary string argument with known length. More...
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const POSIXtimeInNanoseconds arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 Output a POSIXtimeInNanoseconds into a LogMessageRecord. More...
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const int32_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const uint32_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const int64_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const uint64_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const float arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const double arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const char arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, StringInROM arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
std::ostream & operator<< (std::ostream &os, StringInROM arg)
 Convert StringInROM type back to true const char * for output on std::ostream. More...
 
std::ostream & operator<< (std::ostream &os, const TextBlock_struct &arg)
 
std::ostream & operator<< (std::ostream &os, const BinaryBlock_struct &arg)
 
std::ostream & operator<< (std::ostream &os, const HexadecimalBlock_struct &arg)
 
std::ostream & operator<< (std::ostream &os, const EscapedTextBlock_struct &arg)
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const char *arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const std::string &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const void *arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const TextBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const BinaryBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const HexadecimalBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
LogMessageRecordoperator<< (LogMessageRecord &logRec, const EscapedTextBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
 
 DEFINE_COMPONENT_LOG_MASKS (app)
 
 DEFINE_COMPONENT_LOG_MASKS (io)
 
LogMaskType_t COMPONENT_LOG_MASK (io)
 Default io-or-library-related log mask. More...
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct in_addr &addr)
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct in6_addr &addr)
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct sockaddr_in &s)
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct sockaddr_in6 &s)
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct sockaddr_un &s)
 
template<typename STREAM >
STREAM & operator<< (STREAM &os, const struct sockaddr &s)
 
template<typename T >
void LogMessageRecord::emitOverflowError (const T &arg) OME_COLD_ROUTINE
 Called when too many arguments are output. More...
 

Variables

struct LogSubsystemInfo default_LogSubsystemInfo
 Default descriptive information for Logging subsystem. More...
 
LogMaskType_t COMPONENT_LOG_MASK (app)
 Default application log mask; will be aliased to component. More...
 

Detailed Description

High-performance multi-threaded logging APIs that support both textual and binary output.

Macro Definition Documentation

◆ __EXPLICIT_LOG_MESSAGE_BODY

#define __EXPLICIT_LOG_MESSAGE_BODY
Value:
{ \
logRec.emitOverflowError(arg); \
return (logRec); \
} \
addLogArg(logRec, arg); \
logRec.generateFormatString(logRec.argCount - 1); \
return (logRec); \
}

Allow message to be built up using the << operator.

◆ __LOGAPI_EXPAND_STRING1

#define __LOGAPI_EXPAND_STRING1 (   x)    #x

◆ __LOGAPI_EXPAND_STRING2

#define __LOGAPI_EXPAND_STRING2 (   x)    __LOGAPI_EXPAND_STRING1(x)

◆ _ADD_NEW_LOG_ARG

#define _ADD_NEW_LOG_ARG (   typeEnum,
  member 
)
Value:
LogMessageRecord::ArgumentRecord &argRec = logRec.argList[logRec.argCount]; \
argRec.logArgs. member = arg; \
argRec.argLen = sizeof(arg); \
argRec.argBaseType = typeEnum; \
logRec.argCount += 1

◆ _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN

#define _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN (   typeEnum,
  member,
  val,
  len 
)
Value:
LogMessageRecord::ArgumentRecord &argRec = logRec.argList[logRec.argCount]; \
argRec.logArgs. member = val; \
argRec.argLen = len; \
argRec.argBaseType = typeEnum; \
logRec.argCount += 1

◆ _COMPONENT_LEVEL

#define _COMPONENT_LEVEL (   component,
  level 
)    component ## _ ## level

◆ _DECLARE_STANDARD_COMPONENT_VARS

#define _DECLARE_STANDARD_COMPONENT_VARS (   component)
Value:
extern SharedMemoryVariableNode component ## _namingNode ; \

Declare active log mask variable for a component and standard symbolic log level names, providing one level of macro expansion.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.

◆ _DEFAULT_ESCAPED_CHARACTERS

#define _DEFAULT_ESCAPED_CHARACTERS   "\"\n\r\t\b\\"

Default set of characters to be escaped by EscapedTextBlock_struct.

◆ _DEFAULT_NULL_REPLACEMENT

#define _DEFAULT_NULL_REPLACEMENT   "\\0"

Default replacement for null character by EscapedTextBlock_struct.

◆ _DEFAULT_REPLACEMENT_CHARACTERS

#define _DEFAULT_REPLACEMENT_CHARACTERS   "\\\"\0\\n\0\\r\0\\t\0\\b\0\\\\\0"

Default replacement characters for EscapedTextBlock_struct.

◆ _DEFINE_COMPONENT_LOG_MASKS

#define _DEFINE_COMPONENT_LOG_MASKS (   component)
Value:
enum { \
component ## _none = 0, \
component ## _trace = LogMessageRecord::LOG_SEVERITY_TRACE, \
component ## _debug = LogMessageRecord::LOG_SEVERITY_DEBUG, \
component ## _info = LogMessageRecord::LOG_SEVERITY_INFO, \
component ## _information = LogMessageRecord::LOG_SEVERITY_INFO, \
component ## _warn = LogMessageRecord::LOG_SEVERITY_WARN, \
component ## _warning = LogMessageRecord::LOG_SEVERITY_WARN, \
component ## _error = LogMessageRecord::LOG_SEVERITY_ERROR, \
component ## _fatal = LogMessageRecord::LOG_SEVERITY_FATAL, \
component ## _user = LogMessageRecord::LOG_SEVERITY_USER, \
component ## _userInfo1 = COMPONENT_USER_LEVEL(component, info, 1), \
component ## _userInfo2 = COMPONENT_USER_LEVEL(component, info, 2), \
component ## _userInfo3 = COMPONENT_USER_LEVEL(component, info, 3), \
component ## _userInfo4 = COMPONENT_USER_LEVEL(component, info, 4), \
component ## _userInfo5 = COMPONENT_USER_LEVEL(component, info, 5), \
component ## _userInfo6 = COMPONENT_USER_LEVEL(component, info, 6), \
component ## _userDebug1 = COMPONENT_USER_LEVEL(component, debug, 1), \
component ## _userDebug2 = COMPONENT_USER_LEVEL(component, debug, 2), \
component ## _userDebug3 = COMPONENT_USER_LEVEL(component, debug, 3), \
component ## _userDebug4 = COMPONENT_USER_LEVEL(component, debug, 4), \
component ## _userDebug5 = COMPONENT_USER_LEVEL(component, debug, 5), \
component ## _userDebug6 = COMPONENT_USER_LEVEL(component, debug, 6), \
component ## _userTrace1 = COMPONENT_USER_LEVEL(component, trace, 1), \
component ## _userTrace2 = COMPONENT_USER_LEVEL(component, trace, 2), \
component ## _userTrace3 = COMPONENT_USER_LEVEL(component, trace, 3), \
component ## _userTrace4 = COMPONENT_USER_LEVEL(component, trace, 4), \
component ## _userTrace5 = COMPONENT_USER_LEVEL(component, trace, 5), \
component ## _userTrace6 = COMPONENT_USER_LEVEL(component, trace, 6), \
component ## _userLevel1 = COMPONENT_USER_LEVEL(component, none, 1), \
component ## _userLevel2 = COMPONENT_USER_LEVEL(component, none, 2), \
component ## _userLevel3 = COMPONENT_USER_LEVEL(component, none, 3), \
component ## _userLevel4 = COMPONENT_USER_LEVEL(component, none, 4), \
component ## _userLevel5 = COMPONENT_USER_LEVEL(component, none, 5), \
component ## _userLevel6 = COMPONENT_USER_LEVEL(component, none, 6), \
component ## _basicLevels = component ## _trace | component ## _debug | \
component ## _info | component ## _warn | component ## _error | \
component ## _fatal, \
component ## _defaultMask = LogMessageRecord::LOG_SEVERITY_INFO | \
ISABLE_ ## component ## _logMask0 = 0, \
component ## _disableMask = ( LOGAPI_APPEND_TOKEN(DISABLE_COMPONENT_LOG_MASK(component),0) / 10 ) | ( ISABLE_ALL_LOG_MASK ), \
component ## _all = 0x7fffffff }

Define default symbolic log mask names for a component, providing one level of macro expansion.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not provided as a string.

◆ _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK

#define _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK (   component,
  maskValue 
)
Value:
SharedMemoryVariableNode component ## _namingNode( #component); \
LogMaskType_t COMPONENT_LOG_MASK(component)( #component "_logMask", & component ## _namingNode, maskValue)

Define active log mask for a component, providing one level of macro expansion.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
maskValuespecifies the integer value of the bit mask for the log mask variable's initial value.

◆ _INIT_AND_OPEN_STANDARD_LOG

#define _INIT_AND_OPEN_STANDARD_LOG (   argc,
  argv,
  component,
  newArgc,
  newArgv 
)    LogManager::initializeLogSubsystem(newArgc,newArgv,argc, argv, #component , & COMPONENT_LOG_MASK(component)); LogManager::newStandardLogFile()

Initialize and open standard log file for a component, providing one level of macro expansion.

Parameters
argcprovides the count of the number of arguments
argvis an array of const char pointers holding arguments to the program.
componentis the name of the component
newArgcis an lvalue into which the new argument count will be stored.
newArgvis an array of const char pointers into which a duplicate of argv will be placed after any log-related options are stripped. If the initial contents of argc and argv do not need to be preserved, they can be specified as the newArgc and newArgv arguments.

◆ _INIT_WITH_STANDARD_OUT

#define _INIT_WITH_STANDARD_OUT (   argc,
  argv,
  component,
  newArgc,
  newArgv 
)    LogManager::initializeLogSubsystem(newArgc,newArgv,argc, argv, #component , & COMPONENT_LOG_MASK(component)); SharedMemoryVariableNode _logNamingRoot(#component); THIS_COMPONENT_LOG_MANAGER = LogManager::newLogToFileDescriptor(&_logNamingRoot, _STDOUT_FD, default_LogSubsystemInfo.defaultLogPrefix, default_LogSubsystemInfo.useThreads, 0, default_LogSubsystemInfo.maxPendingLogLines * LogManager::MAX_LOG_LINE_LENGTH)

Initialize and use standard out as log device for a component, providing one level of macro expansion.

Parameters
argcprovides the count of the number of arguments
argvis an array of const char pointers holding arguments to the program.
componentis the name of the component
newArgcis an lvalue into which the new argument count will be stored.
newArgvis an array of const char pointers into which a duplicate of argv will be placed after any log-related options are stripped. If the initial contents of argc and argv do not need to be preserved, they can be specified as the newArgc and newArgv arguments.

◆ _INVALID_DESCRIPTOR

#define _INVALID_DESCRIPTOR   -1

Platform-independent reference to invalid descriptor.

◆ _LOGAPI_APPEND_TOKEN

#define _LOGAPI_APPEND_TOKEN (   component,
  suffix 
)    component ## suffix

◆ _OUTPUT_MEMBER_FIELD

#define _OUTPUT_MEMBER_FIELD (   s,
 
)    << " " #f "=" << (s). ## f

Convenience macro to output a member field.

Parameters
sis a reference to the structure from which the field should be obtained
fis the name of the field.

◆ _OUTPUT_MEMBER_FIELD_AS_STRING

#define _OUTPUT_MEMBER_FIELD_AS_STRING (   s,
 
)    _OUTPUT_MEMBER_FIELD_AS_STRING_BLOCK(s,f,strlen((s). ## f))

Convenience macro to output a member field as a string, with the length determined at runtime.

Parameters
sis a reference to the structure from which the field should be obtained
fis the name of the string field.

◆ _OUTPUT_MEMBER_FIELD_AS_STRING_BLOCK

#define _OUTPUT_MEMBER_FIELD_AS_STRING_BLOCK (   s,
  f,
  l 
)    << " " #f "=\"" << AS_ESCAPED_TEXT_BUFFER((s). ## f, l) << "\""

Convenience macro to output a member field as a string.

Parameters
sis a reference to the structure from which the field should be obtained
fis the name of the string field.
lis the length of the string contents desired.

◆ _SET_LOGMGR_FOR

#define _SET_LOGMGR_FOR (   output)    SharedMemoryVariableNode _logNamingRoot ## output(#output); LogManager:: output ## _LogManager = LogManager::newLogToFileDescriptor(&_logNamingRoot ## output, _ ## output ## _FD, default_LogSubsystemInfo.defaultLogPrefix, default_LogSubsystemInfo.useThreads, 0, default_LogSubsystemInfo.maxPendingLogLines * LogManager::MAX_LOG_LINE_LENGTH);

Create log manager for STDOUT or STDERR.

Parameters
outputis either STDOUT or STDERR

◆ _STDERR_FD

#define _STDERR_FD   2

Platform-independent reference to standard error.

◆ _STDIN_FD

#define _STDIN_FD   0

Platform-independent reference to standard in.

◆ _STDOUT_FD

#define _STDOUT_FD   1

Platform-independent reference to standard out.

◆ ALWAYS_EMIT_MESSAGE

#define ALWAYS_EMIT_MESSAGE (   lvl)    ALWAYS_EMIT_MESSAGE_TO_LOG(THIS_COMPONENT_LOG_MANAGER, THIS_COMPONENT_LEVEL(lvl))

Create LogMessageRecord context for content that will always be emitted to default log manager. The active log mask variable has no control over such content.

Parameters
lvlis a symbolic name for the component's log level.

◆ ALWAYS_EMIT_MESSAGE_TO_LOG

#define ALWAYS_EMIT_MESSAGE_TO_LOG (   logHandle,
  mask 
)
Value:
do { \
LogMessageRecord logObj(logHandle, mask, __FILE__, __LINE__, sizeof(__FILE__) - 1)

Create LogMessageRecord context for content that will always be emitted to indicated log manager. The active log mask variable has no control over such content.

Parameters
logHandleis the LogManager object to be used for the output.
maskis the mask that indicates the levels associated with the level name.

◆ APPEND_LOG_BUFFER

#define APPEND_LOG_BUFFER (   dest,
  src 
)
Value:
do { char *_addr; \
FORMAT_LOG_BUFFER(_addr, src); \
dest << _addr; \
RELEASE_LOG_BUFFER(src); \
} while (0)

Append log line data constructed from one LogMessageRecord object into another.

Parameters
destspecifies the LogMessageRecord object into which the generated message should be appended.
srcspecifies the LogMessageRecord currently holding the log message data to be appended.

Note that the normal logging-related APIs use the ALWAYS_EMIT_MESSAGE_TO_LOG() macro, which declares its LogMessageRecord variable as logObj.

◆ AS_BINARY_BUFFER

#define AS_BINARY_BUFFER (   d,
  l 
)    BinaryBlock_struct(d,l)

Convenience label to enable passing buffer with known length to output operator<<().

Parameters
dpoints to the start of the data block.
lspecifies the length of the data block.
See also
BinaryBlock_struct

◆ AS_BINARY_RECORD

#define AS_BINARY_RECORD   logObj.writeAsBinaryToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)

Closing clause to emit log message record as a binary record.

◆ AS_ESCAPED_TEXT_BUFFER

#define AS_ESCAPED_TEXT_BUFFER (   ...)    EscapedTextBlock_struct(__VA_ARGS__)

Convenience label to enable passing text with known length to output operator<<().

  • buffer points to the text to be output
  • bufferLen
  • quotedCharacters
  • escapeCharacter
  • convertNullCharacter
See also
EscapedTextBlock_struct

◆ AS_ESCAPED_TEXT_CHARACTER

#define AS_ESCAPED_TEXT_CHARACTER (   ...)    EscapedTextBlock_struct(__VA_ARGS__)

Convenience label to enable passing a single character to output operator<<().

  • character
  • quotedCharacters
  • escapeCharacter
  • convertNullCharacter
See also
EscapedTextBlock_struct

◆ AS_HEXADECIMAL_BUFFER

#define AS_HEXADECIMAL_BUFFER (   d,
  ... 
)    HexadecimalBlock_struct(d,__VA_ARGS__)

Convenience label to enable passing buffer with known length to output operator<<() but output the bytes as hexadecimal characters.

Parameters
dpoints to the start of the data block.
  • Second parameter is length of block.
  • Third parameter is an optional Boolean that indicates if lowercase is to be used.
See also
HexadecimalBlock_struct

◆ AS_PLAIN_TEXT

#define AS_PLAIN_TEXT   logObj.writeAsTextToBuffer(0); } while (0)

Closing clause to emit log message record as unadorned text.

NOTE: in general, AS_TIMESTAMPED_TEXT is preferred as it provides a lot more information, but there are scenarios where only plain text is desired.

◆ AS_PREFIXED_TEXT

#define AS_PREFIXED_TEXT (   selectionMask)    logObj.writeAsTextToBuffer(selectionMask); } while (0)

Closing clause to emit log message record as text prefixed with arbitrarily selected fields.

Parameters
selectionMaskspecifies the bit mask that selects the initial fields to be output on the log line (such as time, thread, file name, line number, etc.)

NOTE: use caution when changing line layouts. Any information not logged is lost forever. Some simple parsers can be confused by the absence of expected fields.

◆ AS_TEXT_BUFFER

#define AS_TEXT_BUFFER (   s,
  ... 
)    TextBlock_struct(s,__VA_ARGS__)

Convenience label to enable passing text with known length to output operator<<().

See also
TextBlock_struct

◆ AS_TIMESTAMPED_TEXT

#define AS_TIMESTAMPED_TEXT   logObj.writeAsTextToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)

Closing clause to emit log message record as text prefixed with an appropriate timestamp and other information. This is the preferred mechanism.

◆ AUTO_REGISTER_COMPONENT

#define AUTO_REGISTER_COMPONENT (   componentName)    static AutoRegisterLogComponent LOGAPI_APPEND_TOKEN(autoReg_,componentName) (COMPONENT_LOG_MASK(componentName), __LOGAPI_EXPAND_STRING2(componentName), LOGAPI_APPEND_TOKEN(componentName,_defaultMask));

Automatically register a component's active log mask variable with the command line parser.

Parameters
componentNamespecifies the name of the component

◆ AUTO_REGISTER_THIS_COMPONENT

#define AUTO_REGISTER_THIS_COMPONENT ( )    AUTO_REGISTER_COMPONENT(THIS_COMPONENT);

Automatically register default component's active log mask variable with the command line parser by invoking AUTO_REGISTER_COMPONENT() with THIS_COMPONENT.

◆ AUTO_REGISTER_USER_LOG_MASK

#define AUTO_REGISTER_USER_LOG_MASK (   component,
  name,
  label 
)    static AutoRegisterLogLevelName LOGAPI_APPEND_TOKEN(autoRegFlag,LOGAPI_APPEND_TOKEN(component,name))(__LOGAPI_EXPAND_STRING2(name),COMPONENT_LEVEL(component,name),((COMPONENT_LEVEL(component,name) & COMPONENT_LEVEL(component,basicLevels)) ? 0 : label))

Automatically register a user-specific log mask name with the command line parser.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
namespecifies the name of the log level.
labelis a character pointer string that specifies the message type label to be emitted in the log if the log level is not a subset of the basic levels, such as info, warn and error.

◆ BINARY_ENDREC

#define BINARY_ENDREC   "\n"; logObj.writeAsBinaryToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)

Closing attribute to complete LOG_ALWAYS() or LOG_WHEN statement and emit the log message as a binary record.

◆ BINARY_LOG_ENDLINE

#define BINARY_LOG_ENDLINE   BINARY_ENDREC

Closing close for binary record output using << operators.

◆ COMPILE_DEBUG_LEVEL

#define COMPILE_DEBUG_LEVEL   ~0

◆ COMPONENT_LEVEL

#define COMPONENT_LEVEL (   component,
  level 
)    _COMPONENT_LEVEL(component, level)

Compose a symbolic log mask name for a component and level.

Parameters
componentspecifies the component name
levelnames the log level (e.g., info, error, trace, etc.)

◆ COMPONENT_LOG_ENABLED

#define COMPONENT_LOG_ENABLED (   component,
  mask 
)    OME_EXPECT( ( ((mask & LOGAPI_APPEND_TOKEN(component,_disableMask)) == 0 ) && (((uint32_t)(COMPONENT_LOG_MASK(component)) & (mask & ~LogMessageRecord::AND_SPECIAL_MASK)) == (mask & ~LogMessageRecord::AND_SPECIAL_MASK)) ), (static_cast<uint_fast32_t>(mask) & static_cast<uint_fast32_t>(LogMessageRecord::LOG_SEVERITY_DEBUG | LogMessageRecord::LOG_SEVERITY_TRACE | LogMessageRecord::LOG_SEVERITY_USER)) )

Boolean expression to determine if component's active log mask has enabled at least one of the indicated levels.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
maskis the log level mask to be tested

While mask is not required to be a constant value, this is the expected case. The comparison against component_disableMask is expected to take place at compile-time using constant values and either is a constant false, which causes the entire block to be dropped, or a constant true, in which case just the remaining comparison against the logMask is performed at runtime. The subset of the bit mask that excludes the special mode flags is also determined at compile time. When supported by the underlying compiler, a bias is placed on the code layout with the expectation that trace and debug messages will not normally be emitted.

◆ COMPONENT_LOG_MASK

#define COMPONENT_LOG_MASK (   component)    LOGAPI_APPEND_TOKEN(component,_logLevelMask)

Construct variable name for a component's active log mask.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.

◆ COMPONENT_USER_LEVEL

#define COMPONENT_USER_LEVEL (   component,
  baseLevel,
 
)    (COMPONENT_LEVEL(component, baseLevel) | (COMPONENT_LEVEL(component, user) * (1 << N)))

Generate compile-time constant representing a user-specific log level for a component.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
baseLevelidentifies a base log level for which this would be a subset, such as debug or error. If defining a completely new level, then the keyword none should be specified.
Nspecifies the relative user-specific mask instance, starting at 1.

◆ DECLARE_COMPONENT_USER_LOG_MASK

#define DECLARE_COMPONENT_USER_LOG_MASK (   component,
  name,
  baseLevel,
 
)    enum { COMPONENT_LEVEL(component, name) = COMPONENT_USER_LEVEL(component,baseLevel,N) }

Declare a user-specific log mask name.

Arguments are the same as for COMPONENT_USER_LEVEL(). A new component-specific log level, name, will be declared.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
namespecifies the name to be used for the new log level.
baseLevelidentifies a base log level for which this would be a subset, such as debug or error. If defining a completely new level, then the keyword none should be specified.
Nspecifies the relative user-specific mask instance, starting at 1.

◆ DECLARE_STANDARD_COMPONENT_VARS

#define DECLARE_STANDARD_COMPONENT_VARS (   component)    _DECLARE_STANDARD_COMPONENT_VARS(component)

Declare active log mask variable for a component and its standard symbolic log level names.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.

◆ DEFAULT_LOG_DIRECTORY_ENVIRONMENT_VARIABLE

#define DEFAULT_LOG_DIRECTORY_ENVIRONMENT_VARIABLE   "LOGDIR"

◆ DEFINE_COMPONENT_LOG_MASKS

#define DEFINE_COMPONENT_LOG_MASKS (   component)    _DEFINE_COMPONENT_LOG_MASKS(component)

Define default symbolic log mask names for a component.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
Note
The standard names are: trace, debug, info, warn, error, fatal.

◆ DEFINE_COMPONENT_USER_LOG_MASK

#define DEFINE_COMPONENT_USER_LOG_MASK (   component,
  name,
  baseLevel,
  N,
  label 
)    DECLARE_COMPONENT_USER_LOG_MASK(component,name,baseLevel,N); AUTO_REGISTER_USER_LOG_MASK(component,name,label)

Define and automatically register a user-specific log mask for a component using DECLARE_COMPONENT_USER_LOG_MASK(), and AUTO_REGISTER_USER_LOG_MASK().

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
namespecifies the name of the log level.
baseLevelidentifies a base log level for which this would be a subset, such as debug or error. If defining a completely new level, then the keyword none should be specified.
Nspecifies the relative user-specific mask instance, starting at 1.
labelis a character pointer string that specifies the message type label to be emitted in the log if the log level is not a subset of the basic levels, such as info, warn and error.

This is a convenient mechanism to declare and register new log flags specific to a single file. If the user-specific log level will be used in several files, then an appropriate DECLARE_COMPONENT_USER_LOG_MASK() invocation should be placed into a header file included by the relevant C++ source files and AUTO_REGISTER_USER_LOG_MASK() should be placed into a single C++ source file.

◆ DEFINE_STANDARD_COMPONENT_VARS

#define DEFINE_STANDARD_COMPONENT_VARS (   component)    DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT(component,defaultMask)

Define active log mask variable for a component. The default mask value is determined by the component's defaultMask symbolic log level name.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.

If a nonstandard default is required, the DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT() macro can be used directly.

◆ DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT

#define DEFINE_STANDARD_COMPONENT_VARS_AND_DEFAULT (   component,
  defaultMaskName 
)    _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component,COMPONENT_LEVEL(component,defaultMaskName))

Define the active log mask variable for a component and its default mask value using a symbolic log level name.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
defaultMaskNameis a token that names the initial log mask using the named level associated with the component. It is not an integer.

Referenced by DEFINE_STANDARD_COMPONENT_VARS(), which is the macro normally exploited by users. If no symbolic log level name is appropriate, the actual bitmask value can be used with DEFINE_STANDARD_COMPONENT_VARS_AND_MASK().

◆ DEFINE_STANDARD_COMPONENT_VARS_AND_MASK

#define DEFINE_STANDARD_COMPONENT_VARS_AND_MASK (   component,
  maskValue 
)    _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK(component,maskValue)

Define the active log mask variable for a component and its default log mask value. Used in situations where the bitmask value itself is provided, rather than a symbolic log level name.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
maskValuespecifies the integer value of the bit mask for the log mask variable's initial value.

◆ DEFINE_STANDARD_VARS_FOR_THIS_COMPONENT

#define DEFINE_STANDARD_VARS_FOR_THIS_COMPONENT ( )    DEFINE_STANDARD_COMPONENT_VARS(THIS_COMPONENT)

Define the active log mask variable for the default component.

◆ DISABLE_COMPONENT_LOG_LEVEL

#define DISABLE_COMPONENT_LOG_LEVEL (   component,
  level 
)    COMPONENT_LOG_MASK(component) = (uint32_t) COMPONENT_LOG_MASK(component) & ~ COMPONENT_LEVEL(component,level)

Disable a symbolic log level for a component.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
levelnames the log level (e.g., info, error, trace, etc.)

◆ DISABLE_COMPONENT_LOG_MASK

#define DISABLE_COMPONENT_LOG_MASK (   component)    LOGAPI_APPEND_TOKEN(ISABLE_, LOGAPI_APPEND_TOKEN(component,_logMask))

Defines the name of a component-specific compile-time log message disable mask.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.

Command line usage is intended to be:

-DISABLE_component_logMask=n

If defined in source:

#define ISABLE_component_logMask n

where n is a decimal number and component is the component id. If undefined, nothing is inhibited.

Note
As implemented, the value must be expressed as an unadorned decimal number. Symbolic names or parentheses cannot be used; however, the setLogMask utility can be used with the –value option to generate the mask value from a shell script.

◆ EMIT_CONDITIONAL_MESSAGE

#define EMIT_CONDITIONAL_MESSAGE (   lvl)    EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT(THIS_COMPONENT,lvl)

Create LogMessageRecord context for content that will be emitted to the default log manager only if enabled by the default component's active log mask variable.

Parameters
lvlis a symbolic name for the component's log level.

◆ EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT

#define EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT (   component,
  lvl 
)    EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(component,COMPONENT_LEVEL(component,lvl),THIS_COMPONENT_LOG_MANAGER)

Create LogMessageRecord context for content that will be emitted to the default log manager only if enabled by the corresponding component's active log mask variable.

Parameters
componentspecifies the component name. level name.
lvlis a symbolic name for the component's log level.

◆ EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG

#define EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG (   component,
  mask,
  log 
)    if (COMPONENT_LOG_ENABLED(component,mask)) ALWAYS_EMIT_MESSAGE_TO_LOG(log,mask)

Create LogMessageRecord context for content that will be emitted to the indicated log manager only if enabled by the component's active log mask variable.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
maskis the mask that indicates the levels associated with the level name.
logis the LogManager object to be used for the output.

◆ ENABLE_COMPONENT_LOG_LEVEL

#define ENABLE_COMPONENT_LOG_LEVEL (   component,
  level 
)    COMPONENT_LOG_MASK(component) = (uint32_t) COMPONENT_LOG_MASK(component) | COMPONENT_LEVEL(component,level)

Enable a symbolic log level for a component.

Parameters
componentspecifies the component name. It must be a legal variable name; it is not a string.
levelnames the log level (e.g., info, error, trace, etc.)

◆ ENDREC

#define ENDREC   "\n"; logObj.writeAsTextToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0)

Closing attribute to complete a LOG_ALWAYS() or LOG_WHEN() statement and emit the log message as a text line. The result will be subject to the LogManager object's current prefix mask, which might inhibit the output of elements such as the date, thread id, file name, source line number, etc.

◆ FORMAT_LOG_BUFFER

#define FORMAT_LOG_BUFFER (   _var,
  src 
)
Value:
do { \
SharedBufferAllocRecord *_bRec = src.formatRecordAsText(0); \
_var = (char *) src.getLogManager()->getBufferManager()->blockAddress(_bRec)

Format a log buffer and return its address.

Parameters
_varspecifies a previously declared char pointer into which the address of the formatted buffer will be assigned.
srcspecifies the LogMessageRecord currently holding the log message
Returns
A char pointer is returned to the base of the formatted output. A hidden variable _bRec is introduced into a new scope, which must be closed by RELEASE_LOG_BUFFER().

◆ IFLOG_ALWAYS

#define IFLOG_ALWAYS (   lvl)    if (THIS_COMPONENT_LOG_MANAGER != nullptr) ALWAYS_EMIT_MESSAGE(lvl); logObj

Convenience declaration for log line that will always be emitted for the default component if the default log manager has been initialized.

Parameters
lvlis a symbolic name for the component's log level.

◆ IFLOG_COMPONENT

#define IFLOG_COMPONENT (   component,
  lvl 
)    if (OME_EXPECT_TRUE(THIS_COMPONENT_LOG_MANAGER != nullptr)) LOG_COMPONENT_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)

Only if the default log manager has been created, uses the LogManager specified by the THIS_COMPONENT_LOG_MANAGER macro to conditionally emit a log message.

Parameters
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.
Note
This macro can be safely used in library routines that cannot assume that there will be a default LogManager in existence. There are two downsides. The major one is that there is an integer comparison performed on every invocation to check for a non-null pointer. This is not a high computational load and modern CPUs will cache the result of the test, but it is overhead. The other downside is that no message will be emitted if there was no log file created, which makes this mechanism unsuitable for critical messages that must be emitted no matter what. In those scenarios, consider using the STDERR_LogManager as both the STDOUT_LogManger and STDERR_LogManager will always be present.

◆ IFLOG_COMPONENT_ALWAYS

#define IFLOG_COMPONENT_ALWAYS (   component,
  lvl 
)    if (OME_EXPECT_TRUE(THIS_COMPONENT_LOG_MANAGER != nullptr)) ALWAYS_EMIT_MESSAGE_TO_LOG(THIS_COMPONENT_LOG_MANAGER,COMPONENT_LEVEL(component,lvl)); logObj

Similiar to IFLOG_COMPONENT(), but the message cannot be disabled using the component's logLevel mask.

Parameters
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.

◆ IFLOG_WHEN

#define IFLOG_WHEN (   lvl)    if (THIS_COMPONENT_LOG_MANAGER != nullptr) EMIT_CONDITIONAL_MESSAGE(lvl); logObj

Convenience declaration for log line that will be conditionally emitted for the default component if the default log manager has been initialized and the indicate log level is enabled.

Parameters
lvlis a symbolic name for the component's log level.

◆ INIT_STANDARD_LOG_FOR_COMPONENT

#define INIT_STANDARD_LOG_FOR_COMPONENT (   argc,
  argv,
  appName,
  newArgc,
  newArgv 
)    _INIT_AND_OPEN_STANDARD_LOG(argc,argv,appName,newArgc,newArgv)

Initialize the logging subsystem and create the default log file for an application.

Parameters
argcprovides the count of the number of arguments
argvis an array of const char pointers holding arguments to the program.
appNameis the name of the component
newArgcis an lvalue into which the new argument count will be stored.
newArgvis an array of const char pointers into which a duplicate of argv will be placed after any log-related options are stripped. If the initial contents of argc and argv do not need to be preserved, they can be specified as the newArgc and newArgv arguments.

◆ INIT_STANDARD_LOG_FOR_THIS_COMPONENT

#define INIT_STANDARD_LOG_FOR_THIS_COMPONENT (   argc,
  argv,
  newArgc,
  newArgv 
)    INIT_STANDARD_LOG_FOR_COMPONENT(argc,argv,THIS_COMPONENT,newArgc,newArgv)

Initialize the logging subsystem and create the default log file using the component name provided by THIS_COMPONENT.

Parameters
argcprovides the count of the number of arguments
argvis an array of const char pointers holding arguments to the program.
newArgcis an lvalue into which the new argument count will be stored.
newArgvis an array of const char pointers into which a duplicate of argv will be placed after any log-related options are stripped. If the initial contents of argc and argv do not need to be preserved, they can be specified as the newArgc and newArgv arguments.

◆ ISABLE_ALL_LOG_MASK

#define ISABLE_ALL_LOG_MASK   0

Master compile-time log-message disable mask.

If not defined, it will default to 0. Command line usage is -DISABLE_ALL_LOG_MASK=n

◆ LOG_ALWAYS

#define LOG_ALWAYS (   lvl)    ALWAYS_EMIT_MESSAGE(lvl); logObj

Convenience declaration for log line that will be always be emitted for the default component to the default log manager.

Parameters
lvlis a symbolic name for the component's log level.

◆ LOG_ALWAYS_INTO

#define LOG_ALWAYS_INTO (   mgrPtr,
  lvl 
)    LOG_COMPONENT_ALWAYS_INTO(mgrPtr,THIS_COMPONENT,lvl)

Convenience macro that uses LOG_COMPONENT_INTO to emit a message associated with THIS_COMPONENT.

Parameters
mgrPtrspecifies the LogManager object to be used.
lvlis a symbolic name for the component's log level.

◆ LOG_ARG

#define LOG_ARG (   arg)    addLogArg(logObj, arg);

Used to denote an argument for the log message.

Parameters
argspecifies an argument for the log message.

◆ LOG_ARG_USING_BUFFER

#define LOG_ARG_USING_BUFFER (   arg,
  bfr,
  bfrLen 
)    addLogArg(logObj, arg, bfr, bfrLen)

Used to denote an argument that requires a temporary buffer to permit the content to be formatted.

Parameters
argspecifies the argument to be
bfrpoints to the base of the temporary buffer
bfrLenspecifies the length of the temporary buffer.

◆ LOG_BINARY_ARG

#define LOG_BINARY_ARG (   arg,
  len 
)    addLogArg(logObj, arg,len);

Used to denote an binary buffer argument for the log message.

Parameters
argpoints to the start of the buffer.
lenspecifies the length of the buffer.

◆ LOG_CERR

#define LOG_CERR (   lvl)    LOG_INTO(LogManager::STDERR_LogManager, lvl)

Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.

Parameters
lvlis a symbolic name for the component's log level.

◆ LOG_COMPONENT

#define LOG_COMPONENT (   component,
  lvl 
)    LOG_COMPONENT_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)

Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to the default log manager, which is in turn specified by the THIS_COMPONENT_LOG_MANAGER macro.

Parameters
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.

◆ LOG_COMPONENT_ALWAYS

#define LOG_COMPONENT_ALWAYS (   component,
  lvl 
)    LOG_COMPONENT_ALWAYS_INTO(THIS_COMPONENT_LOG_MANAGER,component,lvl)

Convenience macro that uses LOG_COMPONENT_ALWAYS_INTO to log a message to the default log manager, which is in turn specified by the THIS_COMPONENT_LOG_MANAGER macro.

◆ LOG_COMPONENT_ALWAYS_INTO

#define LOG_COMPONENT_ALWAYS_INTO (   mgrPtr,
  component,
  lvl 
)    ALWAYS_EMIT_MESSAGE_TO_LOG(mgrPtr,COMPONENT_LEVEL(component,lvl)); logObj

Always emits a log message constructed using the << operator. The end of line should be terminated with either LOG_ENDLINE or BINARY_LOG_ENDLINE.

  • mgrPtr is a pointer to the LogManager object.
  • component identifies the relevant component.
  • lvl is a symbolic name for the component's log level.

The bulk of the work is provided by the low-level macro ALWAYS_EMIT_MESSAGE_TO_LOG().

◆ LOG_COMPONENT_CERR

#define LOG_COMPONENT_CERR (   component,
  lvl 
)    LOG_COMPONENT_INTO(LogManager::STDERR_LogManager,component,lvl)

Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to standard error.

Parameters
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.

◆ LOG_COMPONENT_COUT

#define LOG_COMPONENT_COUT (   component,
  lvl 
)    LOG_COMPONENT_INTO(LogManager::STDOUT_LogManager,component,lvl)

Convenience macro that uses LOG_COMPONENT_INTO to conditionally log a message to standard output.

Parameters
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.

◆ LOG_COMPONENT_INTO

#define LOG_COMPONENT_INTO (   mgrPtr,
  component,
  lvl 
)    EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(component,COMPONENT_LEVEL(component,lvl),mgrPtr); logObj

Conditionally emits a log message constructed using the << operator. The end of line should be terminated with either LOG_ENDLINE or BINARY_LOG_ENDLINE.

Parameters
mgrPtris a pointer to the LogManager object.
componentidentifies the relevant component.
lvlis a symbolic name for the component's log level.

The bulk of the work is provided by the low-level macro EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG().

◆ LOG_COUT

#define LOG_COUT (   lvl)    LOG_INTO(LogManager::STDOUT_LogManager, lvl)

Convenience macro that uses LOG_INTO() to conditionally log a message to standard output.

Parameters
lvlis a symbolic name for the component's log level.

◆ LOG_ENDLINE

#define LOG_ENDLINE   ENDREC

Closing clause for text line output using << operators.

◆ LOG_INTO

#define LOG_INTO (   mgrPtr,
  lvl 
)    LOG_COMPONENT_INTO(mgrPtr,THIS_COMPONENT,lvl)

Convenience macro that uses LOG_COMPONENT_INTO to conditionally emit a message associated with THIS_COMPONENT.

Parameters
mgrPtrspecifies the LogManager object to be used.
lvlis a symbolic name for the component's log level.

◆ LOG_MESSAGE_FORMAT

#define LOG_MESSAGE_FORMAT (   s)    logObj.setLogFormat(s);

Used to denote the log message format.

Parameters
sspecifies the log message format.

◆ LOG_STREAM_OBJECT

#define LOG_STREAM_OBJECT (   n)
Value:
LogManager LOGAPI_APPEND_TOKEN(_logMgr,n)(nullptr,_INVALID_DESCRIPTOR,false,"logstream",0,LogManager::MAX_LOG_LINE_LENGTH,LOGAPI_APPEND_TOKEN(_logBfr,n),sizeof( LOGAPI_APPEND_TOKEN(_logBfr,n) )); \
LogMessageRecord LOGAPI_APPEND_TOKEN(logObj,n)(& LOGAPI_APPEND_TOKEN(_logMgr,n), 0, __FILE__, __LINE__, sizeof(__FILE__) - 1); LOGAPI_APPEND_TOKEN(logObj,n) << ""

Instantiates a LogMessageRecord object suitable for use as a ostringstream-like buffer.

Parameters
nspecifies the label to be used to name the generated LogMessageRecord object. The label specified by n will be appended to the prefix logObj to construct the variable name. The user can thus have multiple variables in existence simultaneously by using distinct labels.

The constructed content is expected to be retrieved and copied into the destination log using LOG_APPEND_BUFFER().

◆ LOG_TO_DESCRIPTOR

#define LOG_TO_DESCRIPTOR (   output,
  lvl 
)    EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG(THIS_COMPONENT,lvl,output ## _LogManager)

Convenience macro to emit conditional message for THIS_COMPONENT via a LogManager associated with standard output or error.

Parameters
outputspecifies the name of responsible log manager and is intended to be STDOUT, STDERR, or DEFAULT.
lvlis a symbolic name for the component's log level.
Note
This will work with arbitrary LogManager objects if their variable is named with a "_LogManager" suffix.

◆ LOG_WHEN

#define LOG_WHEN (   lvl)    EMIT_CONDITIONAL_MESSAGE(lvl); logObj

Convenience declaration for log line that will be conditionally emitted for the default component to the default log manager if the indicated log level is enabled.

Parameters
lvlis a symbolic name for the component's log level.

◆ LOG_WHEN_OSTREAM

#define LOG_WHEN_OSTREAM (   stream,
  lvl 
)    if (COMPONENT_LOG_ENABLED(THIS_COMPONENT,THIS_COMPONENT_LEVEL(lvl))) do { stream

Convenience macro for conditional log output using a std::ostream or allomorphic equivalent.

Parameters
streamspecifies the output stream.
lvlis a symbolic name for the component's log level.

◆ LOGAPI_APPEND_TOKEN

#define LOGAPI_APPEND_TOKEN (   component,
  suffix 
)    _LOGAPI_APPEND_TOKEN(component,suffix)

Concatenate two tokens together to create new variable name.

Parameters
componentspecifies the first token
suffixspecifies the second token

◆ LOGFILE_BFR_MAGIC_NUMBER

#define LOGFILE_BFR_MAGIC_NUMBER   "LOGCBFR"

Magic number for shared memory log file buffer.

◆ OSTREAM_ENDLINE

#define OSTREAM_ENDLINE   "\n"; } while (0)

End-of-Line fragment for use with LOG_WHEN_OSTREAM.

◆ PROCESS_COMMANDLINE_LOG_FLAGS

#define PROCESS_COMMANDLINE_LOG_FLAGS (   argc,
  argv 
)    LogMessageRecord::process_commandline_log_flags(&default_LogSubsystemInfo, argc, argv, &argc, argv)

Standard mechanism to process logging-related command line arguments.

Parameters
argcspecifies the total number of arguments.
argvis an array of char pointers corresponding to command line arguments.
Note
This is the standard mechanism to process logging-related arguments to an application. It is typically used as the first statement in main(). Any discovered logging-related arguments are processed and removed from the argv array and argc is set accordingly.

◆ RELEASE_LOG_BUFFER

#define RELEASE_LOG_BUFFER (   src)    src.getLogManager()->getBufferManager()->returnBlock(_bRec); } while (0)

Release a log buffer formatted by FORMAT_LOG_BUFFER()

◆ SiR

#define SiR (   x)    ((StringInROM) (x))

Very short macro to encapsulate content intended to be flagged as "permanent" String-in-ROM text.

◆ SPLIT_ACROSS_LINES

#define SPLIT_ACROSS_LINES (   label,
  ... 
)
Value:
"BEGIN " << label << "\n"; \
logObj.writeAsTextToBuffer(logObj.getLogManager()->getLogPrefixMask()); \
LogMessageRecord::splitLongLogLine(logObj, __VA_ARGS__); \
logObj << "END " << label

Label a block of text that is split across multiple log lines.

Parameters
labelspecifies the text label to be used to identify the block.

The LogMessageRecord::splitLongLogLine() routine is used to perform the actual split across multiple lines.

◆ SUGGESTED_DEFAULT_MAX_LOG_LINES

#define SUGGESTED_DEFAULT_MAX_LOG_LINES   1024

Recommended default amount of maximum buffered log lines.

◆ THIS_COMPONENT_AS_STRING

#define THIS_COMPONENT_AS_STRING   __LOGAPI_EXPAND_STRING2(THIS_COMPONENT)

Provides the value of THIS_COMPONENT as a text string or const char[] value.

◆ THIS_COMPONENT_LEVEL

#define THIS_COMPONENT_LEVEL (   level)    COMPONENT_LEVEL(THIS_COMPONENT, level)

Compose a symbolic log mask name for the default component and level.

Parameters
levelnames the log level (e.g., info, error, trace, etc.)

◆ THIS_COMPONENT_LOG_MANAGER

#define THIS_COMPONENT_LOG_MANAGER   LogManager::DEFAULT_LogManager

Defines the default log manager object for the component.

Note
Normally, only THIS_COMPONENT is defined by user source code, but a custom LogManager object for the component can be utilized by defining THIS_COMPONENT_LOG_MANAGER appropriately.

If left undefined, which is the normal case, it will default to LogManager::DEFAULT_LogManager.

For scenarios in which multiple logs must be manipulated within a single source file, the ALWAYS_EMIT_MESSAGE_TO_LOG() and EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG() macros provide the necessary interfaces.

◆ THIS_COMPONENT_LOG_MASK

#define THIS_COMPONENT_LOG_MASK   COMPONENT_LOG_MASK(THIS_COMPONENT)

Construct variable name for the default component's active log mask.

◆ THIS_COMPONENT_USER_LEVEL

#define THIS_COMPONENT_USER_LEVEL (   baseLevel,
 
)    COMPONENT_USER_LEVEL(THIS_COMPONENT, baseLevel, N)

Convenience macro that uses COMPONENT_USER_LEVEL() with THIS_COMPONENT as the component argument.

Parameters
baseLevelidentifies a base log level for which this would be a subset, such as debug or error. If defining a completely new level, then the keyword none should be specified.
Nspecifies the relative user-specific mask instance, starting at 1.

◆ USE_GETTID_FOR_THREADID

#define USE_GETTID_FOR_THREADID   0

Permits use of gettid() rather than pthread_self() for thread Id on Linux.

Note
gettid() is about 30 times slower than pthread_self(), so do not enable its usage unless the external process Id is truly required.

◆ WITH_DATE_TIME_LEVEL

#define WITH_DATE_TIME_LEVEL   logObj.writeAsTextToBuffer( LogMessageRecord::LOG_DATESTAMP | LogMessageRecord::LOG_TIMESTAMP | LogMessageRecord::LOG_ERROR_LEVEL); } while (0)

log as $date_time $log_level $msg

◆ WITH_TIME_LEVEL

#define WITH_TIME_LEVEL   logObj.writeAsTextToBuffer(LogMessageRecord::LOG_TIMESTAMP | LogMessageRecord::LOG_ERROR_LEVEL); } while (0)

log as $time $log_level $msg

Typedef Documentation

◆ LogMaskPrimitiveType_t

typedef uint_fast32_t LogMaskPrimitiveType_t

◆ LogMaskType_t

◆ StringInROM

typedef const struct StringInROM_struct* StringInROM

Typedef to mark string data in text segment.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
LOG_LINE_BINARY_FORMAT_VER1 

Denotes version of 1 of the header format.

LOG_LINE_BINARY_FORMAT_LE 

Indicates little-endian, IEEE 754 floating point format.

LOG_LINE_BINARY_FORMAT_BE 

Indicates big-endian, IEEE 754 floating point format.

LOG_LINE_BINARY_FORMAT_BE_S360 

Indicates big-endian, IBM System/360 hexadecimal floating point.

Function Documentation

◆ addLogArg() [1/19]

void addLogArg ( LogMessageRecord logRec,
const BinaryBlock_struct arg 
)
inline

Add binary string argument with known length.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the block of binary data to be added to the log message.
Warning
The block of data is not copied immediately and must remain available until the output line output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, LogMessageRecord::ArgumentRecord::argBaseType, LogMessageRecord::argCount, LogMessageRecord::ArgumentRecord::argLen, LogMessageRecord::argList, BinaryBlock_struct::bfrLen, LogMessageRecord::LOG_argument_union::bytes, BinaryBlock_struct::dataBfr, LogMessageRecord::LOG_ARG_TYPE_CHAR, LogMessageRecord::LOG_ARG_TYPE_TEXT_FRAGMENT, and LogMessageRecord::ArgumentRecord::logArgs.

◆ addLogArg() [2/19]

void addLogArg ( LogMessageRecord logRec,
const char *  arg 
)
inline

Add text string argument.

Parameters
logRecreferences the LogMessageRecord being prepared.
argpoints to the string argument be added to the log message.
Warning
The text string value is not copied immediately and must remain available until either the format line is generated by generateFormatString() or the output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT.

◆ addLogArg() [3/19]

void addLogArg ( LogMessageRecord logRec,
const char  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_CHAR.

◆ addLogArg() [4/19]

void addLogArg ( LogMessageRecord logRec,
const double  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_DOUBLE.

◆ addLogArg() [5/19]

void addLogArg ( LogMessageRecord logRec,
const float  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_FLOAT.

◆ addLogArg() [6/19]

void addLogArg ( LogMessageRecord logRec,
const HexadecimalBlock_struct arg 
)
inline

Add binary string argument with known length.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the block of data to be added as hexadecimal data to the log message.
Warning
The block of data is not copied immediately and must remain available until the output line output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, HexadecimalBlock_struct::asLowercase, HexadecimalBlock_struct::bfrLen, HexadecimalBlock_struct::dataBfr, LogMessageRecord::LOG_ARG_TYPE_HEX_FRAGMENT, and LogMessageRecord::LOG_ARG_TYPE_HEX_FRAGMENT_UPPER.

◆ addLogArg() [7/19]

void addLogArg ( LogMessageRecord logRec,
const int32_t  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_INT32.

Referenced by LogMessageRecord::splitLongLogLine().

◆ addLogArg() [8/19]

void addLogArg ( LogMessageRecord logRec,
const int64_t  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_INT64.

◆ addLogArg() [9/19]

void addLogArg ( LogMessageRecord logRec,
const POSIXtimeInNanoseconds  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, POSIXtimeInUnits< UNITS >::convertToNanosecondsSinceEpoch(), and LogMessageRecord::LOG_ARG_TYPE_POSIX_NANOSECONDS.

◆ addLogArg() [10/19]

void addLogArg ( LogMessageRecord logRec,
const size_t  arg 
)

◆ addLogArg() [11/19]

void addLogArg ( LogMessageRecord logRec,
const ssize_t  arg 
)

◆ addLogArg() [12/19]

void addLogArg ( LogMessageRecord logRec,
const std::string &  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.
Warning
The text string value is not copied immediately and must remain available until the format line is generated by generateFormatString() or the output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT.

◆ addLogArg() [13/19]

void addLogArg ( LogMessageRecord logRec,
const TextBlock_struct arg 
)
inline

Add text string argument with known length.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.
Warning
The text string value is not copied immediately and must remain available until either the format line is generated by generateFormatString() or the output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, LogMessageRecord::ArgumentRecord::argBaseType, LogMessageRecord::argCount, LogMessageRecord::ArgumentRecord::argLen, LogMessageRecord::argList, LogMessageRecord::LOG_argument_union::asChars, TextBlock_struct::bfrLen, LogMessageRecord::LOG_ARG_TYPE_CHAR, LogMessageRecord::LOG_ARG_TYPE_TEXT_FRAGMENT, LogMessageRecord::ArgumentRecord::logArgs, and TextBlock_struct::textBfr.

◆ addLogArg() [14/19]

void addLogArg ( LogMessageRecord logRec,
const uint32_t  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_UINT32.

◆ addLogArg() [15/19]

void addLogArg ( LogMessageRecord logRec,
const uint64_t  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_UINT64.

◆ addLogArg() [16/19]

void addLogArg ( LogMessageRecord logRec,
const void *  arg 
)
inline

Add log argument of indicated type.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_POINTER.

◆ addLogArg() [17/19]

void addLogArg ( LogMessageRecord logRec,
const void *  arg,
const size_t  l 
)
inline

Add log argument representing a pointer.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the argument to be added to the log message.
lis indicates the length of the content.

If the length l provided is 0, the pointer itself is the value of interest. If the length is non-zero, then the region of memory referenced by the argument is the value of interest.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, l, and LogMessageRecord::LOG_ARG_TYPE_POINTER.

◆ addLogArg() [18/19]

void addLogArg ( LogMessageRecord logRec,
StringInROM  arg 
)
inline

Add text string data which is expected to be permanently available.

Parameters
logRecreferences the LogMessageRecord being prepared.
argpoints to the string to be added to the log message.
Note
The text string value is not copied immediately and is expected to always remain available for access (e.g., string constants, long-lived heap objects are suitable sources).

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_ROM_TEXT.

◆ addLogArg() [19/19]

void addLogArg ( LogMessageRecord logRec,
uint_fast32_t  len,
const char *  arg 
)
inline

Add text string argument with known length.

Parameters
logRecreferences the LogMessageRecord being prepared.
lenspecifies the number of bytes to be copied from the string.
argpoints to the start of the string contents.
Warning
The text string value is not copied immediately and must remain available until either the format line is generated by generateFormatString() or the output line is written.

References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT_FRAGMENT.

◆ COMPONENT_LOG_MASK()

LogMaskType_t COMPONENT_LOG_MASK ( io  )

Default io-or-library-related log mask.

◆ DEFINE_COMPONENT_LOG_MASKS() [1/2]

DEFINE_COMPONENT_LOG_MASKS ( app  )

◆ DEFINE_COMPONENT_LOG_MASKS() [2/2]

DEFINE_COMPONENT_LOG_MASKS ( io  )

◆ emitOverflowError()

template<typename T >
void LogMessageRecord::emitOverflowError ( const T &  arg)
inline

Called when too many arguments are output.

Parameters
argreferences the argument that cannot be output.

References LogMessageRecord::argCountExceeded, LogMessageRecord::LOG_MAX_ARGUMENT_TOTAL, LogMessageRecord::sourceFile, and LogMessageRecord::sourceLine.

◆ operator<<() [1/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const BinaryBlock_struct arg 
)
inline

◆ operator<<() [2/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const char *  arg 
)
inline

◆ operator<<() [3/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const char  arg 
)
inline

◆ operator<<() [4/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const double  arg 
)
inline

◆ operator<<() [5/27]

◆ operator<<() [6/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const float  arg 
)
inline

◆ operator<<() [7/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const HexadecimalBlock_struct arg 
)
inline

◆ operator<<() [8/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const int32_t  arg 
)
inline

◆ operator<<() [9/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const int64_t  arg 
)
inline

◆ operator<<() [10/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const POSIXtimeInNanoseconds  arg 
)
inline

Output a POSIXtimeInNanoseconds into a LogMessageRecord.

Parameters
logRecreferences the LogMessageRecord being prepared.
argis the nanoseconds to be added to the log message.
Note
This is specified to take precedence over a templated version which would cause the value to be immediately converted to text rather than allow it to be acquired for subsequent processing.

References __EXPLICIT_LOG_MESSAGE_BODY.

◆ operator<<() [11/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const std::string &  arg 
)
inline

◆ operator<<() [12/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const TextBlock_struct arg 
)
inline

◆ operator<<() [13/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const uint32_t  arg 
)
inline

◆ operator<<() [14/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const uint64_t  arg 
)
inline

◆ operator<<() [15/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
const void *  arg 
)
inline

◆ operator<<() [16/27]

LogMessageRecord & operator<< ( LogMessageRecord logRec,
StringInROM  arg 
)
inline

◆ operator<<() [17/27]

std::ostream& operator<< ( std::ostream &  os,
const BinaryBlock_struct arg 
)
inline

◆ operator<<() [18/27]

◆ operator<<() [19/27]

◆ operator<<() [20/27]

std::ostream& operator<< ( std::ostream &  os,
const TextBlock_struct arg 
)
inline

◆ operator<<() [21/27]

std::ostream& operator<< ( std::ostream &  os,
StringInROM  arg 
)
inline

Convert StringInROM type back to true const char * for output on std::ostream.

Parameters
osreferences the output stream
argis the string to be output.

◆ operator<<() [22/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct in6_addr &  addr 
)
inline

References buffer.

◆ operator<<() [23/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct in_addr &  addr 
)
inline

References buffer.

◆ operator<<() [24/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct sockaddr &  s 
)
inline

References s.

◆ operator<<() [25/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct sockaddr_in &  s 
)
inline

References ntohs, and s.

◆ operator<<() [26/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct sockaddr_in6 &  s 
)
inline

References ntohs, and s.

◆ operator<<() [27/27]

template<typename STREAM >
STREAM& operator<< ( STREAM &  os,
const struct sockaddr_un &  s 
)
inline

References s.

Variable Documentation

◆ COMPONENT_LOG_MASK

LogMaskType_t COMPONENT_LOG_MASK(io) ( app  )

Default application log mask; will be aliased to component.

Default io-or-library-related log mask.

◆ default_LogSubsystemInfo

struct LogSubsystemInfo default_LogSubsystemInfo
LogMessageRecord::LOG_SEVERITY_WARN
@ LOG_SEVERITY_WARN
Definition: logging_api.hpp:1067
SMV_StandaloneNumeric
Convenience template for creating shared memory variables of one of the supported numeric types....
Definition: shared_variable.hpp:436
LogMessageRecord::splitLongLogLine
static void splitLongLogLine(LogMessageRecord &context, const char *line, const char *separators=",;", size_t blockLength=LogManager::MAX_LOG_LINE_LENGTH)
Split the content of a null-terminate string across multiple log lines, breaking the lines at appropr...
Definition: logging_api.cpp:2055
LOGAPI_APPEND_TOKEN
#define LOGAPI_APPEND_TOKEN(component, suffix)
Concatenate two tokens together to create new variable name.
Definition: logging_api.hpp:2207
LogMessageRecord::LOG_SEVERITY_DEBUG
@ LOG_SEVERITY_DEBUG
Definition: logging_api.hpp:1065
LogMessageRecord::LOG_SEVERITY_TRACE
@ LOG_SEVERITY_TRACE
Definition: logging_api.hpp:1064
SharedMemoryVariableNode
Intermediate naming node for supporting variable naming hierarchies.
Definition: shared_variable.hpp:318
_INVALID_DESCRIPTOR
#define _INVALID_DESCRIPTOR
Platform-independent reference to invalid descriptor.
Definition: logging_api.hpp:2618
DISABLE_COMPONENT_LOG_MASK
#define DISABLE_COMPONENT_LOG_MASK(component)
Defines the name of a component-specific compile-time log message disable mask.
Definition: logging_api.hpp:2250
ISABLE_ALL_LOG_MASK
#define ISABLE_ALL_LOG_MASK
Master compile-time log-message disable mask.
Definition: logging_api.hpp:2225
LogMessageRecord::AND_USE_SYSLOG
@ AND_USE_SYSLOG
Definition: logging_api.hpp:1071
LogMessageRecord::ArgumentRecord
Definition: logging_api.hpp:1135
LogMessageRecord::LOG_MAX_ARGUMENT_TOTAL
@ LOG_MAX_ARGUMENT_TOTAL
Maximum number of arguments for an output line.
Definition: logging_api.hpp:1030
COMPONENT_USER_LEVEL
#define COMPONENT_USER_LEVEL(component, baseLevel, N)
Generate compile-time constant representing a user-specific log level for a component.
Definition: logging_api.hpp:2322
LogMessageRecord::LOG_SEVERITY_ERROR
@ LOG_SEVERITY_ERROR
Definition: logging_api.hpp:1068
COMPONENT_LOG_MASK
#define COMPONENT_LOG_MASK(component)
Construct variable name for a component's active log mask.
Definition: logging_api.hpp:2214
LogMessageRecord::LOG_SEVERITY_FATAL
@ LOG_SEVERITY_FATAL
Definition: logging_api.hpp:1069
LogMessageRecord::ArgumentRecord::logArgs
LOG_argument_union logArgs
Definition: logging_api.hpp:1136
OME_EXPECT_FALSE
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
LogMessageRecord::LOG_SEVERITY_USER
@ LOG_SEVERITY_USER
Definition: logging_api.hpp:1070
LogMessageRecord::LOG_SEVERITY_INFO
@ LOG_SEVERITY_INFO
Definition: logging_api.hpp:1066
DEFINE_COMPONENT_LOG_MASKS
#define DEFINE_COMPONENT_LOG_MASKS(component)
Define default symbolic log mask names for a component.
Definition: logging_api.hpp:2444
LogMessageRecord::AND_USE_STDERR
@ AND_USE_STDERR
Definition: logging_api.hpp:1072
LogManager::MAX_LOG_LINE_LENGTH
@ MAX_LOG_LINE_LENGTH
Default maximum length of a log line.
Definition: logging_api.hpp:610
Generated: Fri Jul 31 2020 18:19:16
Support Information