FARGOS/VISTA Object Management Environment Core
..
|
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_t > | LogMaskType_t |
typedef const struct StringInROM_struct * | StringInROM |
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... | |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const POSIXtimeInNanoseconds arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
Output a POSIXtimeInNanoseconds into a LogMessageRecord. More... | |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const int32_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const uint32_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const int64_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const uint64_t arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const float arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const double arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const char arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (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) |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const char *arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const std::string &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const void *arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const TextBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const BinaryBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (LogMessageRecord &logRec, const HexadecimalBlock_struct &arg) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
LogMessageRecord & | operator<< (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... | |
High-performance multi-threaded logging APIs that support both textual and binary output.
#define __EXPLICIT_LOG_MESSAGE_BODY |
Allow message to be built up using the << operator.
#define __LOGAPI_EXPAND_STRING1 | ( | x | ) | #x |
#define __LOGAPI_EXPAND_STRING2 | ( | x | ) | __LOGAPI_EXPAND_STRING1(x) |
#define _ADD_NEW_LOG_ARG | ( | typeEnum, | |
member | |||
) |
#define _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN | ( | typeEnum, | |
member, | |||
val, | |||
len | |||
) |
#define _COMPONENT_LEVEL | ( | component, | |
level | |||
) | component ## _ ## level |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
#define _DEFAULT_ESCAPED_CHARACTERS "\"\n\r\t\b\\" |
Default set of characters to be escaped by EscapedTextBlock_struct.
#define _DEFAULT_NULL_REPLACEMENT "\\0" |
Default replacement for null character by EscapedTextBlock_struct.
#define _DEFAULT_REPLACEMENT_CHARACTERS "\\\"\0\\n\0\\r\0\\t\0\\b\0\\\\\0" |
Default replacement characters for EscapedTextBlock_struct.
#define _DEFINE_COMPONENT_LOG_MASKS | ( | component | ) |
Define default symbolic log mask names for a component, providing one level of macro expansion.
component | specifies the component name. It must be a legal variable name; it is not provided as a string. |
#define _DEFINE_STANDARD_COMPONENT_VARS_AND_MASK | ( | component, | |
maskValue | |||
) |
Define active log mask for a component, providing one level of macro expansion.
component | specifies the component name. It must be a legal variable name; it is not a string. |
maskValue | specifies the integer value of the bit mask for the log mask variable's initial value. |
#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.
argc | provides the count of the number of arguments |
argv | is an array of const char pointers holding arguments to the program. |
component | is the name of the component |
newArgc | is an lvalue into which the new argument count will be stored. |
newArgv | is 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. |
#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.
argc | provides the count of the number of arguments |
argv | is an array of const char pointers holding arguments to the program. |
component | is the name of the component |
newArgc | is an lvalue into which the new argument count will be stored. |
newArgv | is 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. |
#define _INVALID_DESCRIPTOR -1 |
Platform-independent reference to invalid descriptor.
#define _LOGAPI_APPEND_TOKEN | ( | component, | |
suffix | |||
) | component ## suffix |
Convenience macro to output a member field.
s | is a reference to the structure from which the field should be obtained |
f | is the name of the field. |
#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.
s | is a reference to the structure from which the field should be obtained |
f | is the name of the string field. |
#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.
s | is a reference to the structure from which the field should be obtained |
f | is the name of the string field. |
l | is the length of the string contents desired. |
#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.
output | is either STDOUT or STDERR |
#define _STDERR_FD 2 |
Platform-independent reference to standard error.
#define _STDIN_FD 0 |
Platform-independent reference to standard in.
#define _STDOUT_FD 1 |
Platform-independent reference to standard out.
#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.
lvl | is a symbolic name for the component's log level. |
#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.
logHandle | is the LogManager object to be used for the output. |
mask | is the mask that indicates the levels associated with the level name. |
#define APPEND_LOG_BUFFER | ( | dest, | |
src | |||
) |
Append log line data constructed from one LogMessageRecord object into another.
dest | specifies the LogMessageRecord object into which the generated message should be appended. |
src | specifies 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
.
#define AS_BINARY_BUFFER | ( | d, | |
l | |||
) | BinaryBlock_struct(d,l) |
Convenience label to enable passing buffer with known length to output operator<<().
d | points to the start of the data block. |
l | specifies the length of the data block. |
#define AS_BINARY_RECORD logObj.writeAsBinaryToBuffer(logObj.getLogManager()->getLogPrefixMask()); } while (0) |
Closing clause to emit log message record as a binary record.
#define AS_ESCAPED_TEXT_BUFFER | ( | ... | ) | EscapedTextBlock_struct(__VA_ARGS__) |
Convenience label to enable passing text with known length to output operator<<().
#define AS_ESCAPED_TEXT_CHARACTER | ( | ... | ) | EscapedTextBlock_struct(__VA_ARGS__) |
Convenience label to enable passing a single character to output operator<<().
#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.
d | points to the start of the data block. |
#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.
#define AS_PREFIXED_TEXT | ( | selectionMask | ) | logObj.writeAsTextToBuffer(selectionMask); } while (0) |
Closing clause to emit log message record as text prefixed with arbitrarily selected fields.
selectionMask | specifies 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.
#define AS_TEXT_BUFFER | ( | s, | |
... | |||
) | TextBlock_struct(s,__VA_ARGS__) |
Convenience label to enable passing text with known length to output operator<<().
#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.
#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.
componentName | specifies the name of the 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.
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
name | specifies the name of the log level. |
label | is 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 . |
#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.
#define BINARY_LOG_ENDLINE BINARY_ENDREC |
Closing close for binary record output using << operators.
#define COMPILE_DEBUG_LEVEL ~0 |
#define COMPONENT_LEVEL | ( | component, | |
level | |||
) | _COMPONENT_LEVEL(component, level) |
Compose a symbolic log mask name for a component and level.
component | specifies the component name |
level | names the log level (e.g., info, error, trace, etc.) |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
mask | is 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.
#define COMPONENT_LOG_MASK | ( | component | ) | LOGAPI_APPEND_TOKEN(component,_logLevelMask) |
Construct variable name for a component's active log mask.
component | specifies the component name. It must be a legal variable name; it is not a string. |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
baseLevel | identifies 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. |
N | specifies the relative user-specific mask instance, starting at 1. |
#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.
Arguments are the same as for COMPONENT_USER_LEVEL(). A new component-specific log level, name, will be declared.
component | specifies the component name. It must be a legal variable name; it is not a string. |
name | specifies the name to be used for the new log level. |
baseLevel | identifies 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. |
N | specifies the relative user-specific mask instance, starting at 1. |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
#define DEFAULT_LOG_DIRECTORY_ENVIRONMENT_VARIABLE "LOGDIR" |
#define DEFINE_COMPONENT_LOG_MASKS | ( | component | ) | _DEFINE_COMPONENT_LOG_MASKS(component) |
Define default symbolic log mask names for a component.
component | specifies the component name. It must be a legal variable name; it is not a string. |
trace
, debug
, info
, warn
, error
, fatal
. #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().
component | specifies the component name. It must be a legal variable name; it is not a string. |
name | specifies the name of the log level. |
baseLevel | identifies 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. |
N | specifies the relative user-specific mask instance, starting at 1. |
label | is 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 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.
component | specifies 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 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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
defaultMaskName | is 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 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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
maskValue | specifies the integer value of the bit mask for the log mask variable's initial value. |
#define DEFINE_STANDARD_VARS_FOR_THIS_COMPONENT | ( | ) | DEFINE_STANDARD_COMPONENT_VARS(THIS_COMPONENT) |
Define the active log mask variable for the default component.
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
level | names the log level (e.g., info, error, trace, etc.) |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
Command line usage is intended to be:
If defined in source:
where n is a decimal number and component is the component id. If undefined, nothing is inhibited.
–value
option to generate the mask value from a shell script. #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.
lvl | is a symbolic name for the component's log level. |
#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.
component | specifies the component name. level name. |
lvl | is a symbolic name for the component's log level. |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
mask | is the mask that indicates the levels associated with the level name. |
log | is the LogManager object to be used for the output. |
#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.
component | specifies the component name. It must be a legal variable name; it is not a string. |
level | names the log level (e.g., info, error, trace, etc.) |
#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.
#define FORMAT_LOG_BUFFER | ( | _var, | |
src | |||
) |
Format a log buffer and return its address.
_var | specifies a previously declared char pointer into which the address of the formatted buffer will be assigned. |
src | specifies the LogMessageRecord currently holding the log message |
RELEASE_LOG_BUFFER()
. #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.
lvl | is a symbolic name for the component's log level. |
#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.
component | identifies the relevant component. |
lvl | is a symbolic name for the component's log level. |
#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.
component | identifies the relevant component. |
lvl | is a symbolic name for the component's log level. |
#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.
lvl | is a symbolic name for the component's log level. |
#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.
argc | provides the count of the number of arguments |
argv | is an array of const char pointers holding arguments to the program. |
appName | is the name of the component |
newArgc | is an lvalue into which the new argument count will be stored. |
newArgv | is 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. |
#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
.
argc | provides the count of the number of arguments |
argv | is an array of const char pointers holding arguments to the program. |
newArgc | is an lvalue into which the new argument count will be stored. |
newArgv | is 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. |
#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
#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.
lvl | is a symbolic name for the component's log level. |
#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.
mgrPtr | specifies the LogManager object to be used. |
lvl | is a symbolic name for the component's log level. |
#define LOG_ARG | ( | arg | ) | addLogArg(logObj, arg); |
Used to denote an argument for the log message.
arg | specifies an argument for the log message. |
#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.
arg | specifies the argument to be |
bfr | points to the base of the temporary buffer |
bfrLen | specifies the length of the temporary buffer. |
#define LOG_BINARY_ARG | ( | arg, | |
len | |||
) | addLogArg(logObj, arg,len); |
Used to denote an binary buffer argument for the log message.
arg | points to the start of the buffer. |
len | specifies the length of the buffer. |
#define LOG_CERR | ( | lvl | ) | LOG_INTO(LogManager::STDERR_LogManager, lvl) |
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
lvl | is a symbolic name for the component's log level. |
#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.
component | identifies the relevant component. |
lvl | is a symbolic name for the component's log level. |
#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.
#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.
The bulk of the work is provided by the low-level macro ALWAYS_EMIT_MESSAGE_TO_LOG().
#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.
component | identifies the relevant component. |
lvl | is a symbolic name for the component's log level. |
#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.
component | identifies the relevant component. |
lvl | is a symbolic name for the component's log level. |
#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.
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 EMIT_CONDITIONAL_MESSAGE_FOR_COMPONENT_TO_LOG().
#define LOG_COUT | ( | lvl | ) | LOG_INTO(LogManager::STDOUT_LogManager, lvl) |
Convenience macro that uses LOG_INTO() to conditionally log a message to standard output.
lvl | is a symbolic name for the component's log level. |
#define LOG_ENDLINE ENDREC |
Closing clause for text line output using << operators.
#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.
mgrPtr | specifies the LogManager object to be used. |
lvl | is a symbolic name for the component's log level. |
Used to denote the log message format.
s | specifies the log message format. |
#define LOG_STREAM_OBJECT | ( | n | ) |
Instantiates a LogMessageRecord object suitable for use as a ostringstream-like buffer.
n | specifies 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()
.
#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.
output | specifies the name of responsible log manager and is intended to be STDOUT , STDERR , or DEFAULT . |
lvl | is a symbolic name for the component's log level. |
#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.
lvl | is a symbolic name for the component's log level. |
#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.
stream | specifies the output stream. |
lvl | is a symbolic name for the component's log level. |
#define LOGAPI_APPEND_TOKEN | ( | component, | |
suffix | |||
) | _LOGAPI_APPEND_TOKEN(component,suffix) |
Concatenate two tokens together to create new variable name.
component | specifies the first token |
suffix | specifies the second token |
#define LOGFILE_BFR_MAGIC_NUMBER "LOGCBFR" |
Magic number for shared memory log file buffer.
#define OSTREAM_ENDLINE "\n"; } while (0) |
End-of-Line fragment for use with LOG_WHEN_OSTREAM
.
#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.
argc | specifies the total number of arguments. |
argv | is an array of char pointers corresponding to command line arguments. |
main()
. Any discovered logging-related arguments are processed and removed from the argv array and argc is set accordingly. #define RELEASE_LOG_BUFFER | ( | src | ) | src.getLogManager()->getBufferManager()->returnBlock(_bRec); } while (0) |
Release a log buffer formatted by FORMAT_LOG_BUFFER()
#define SiR | ( | x | ) | ((StringInROM) (x)) |
Very short macro to encapsulate content intended to be flagged as "permanent" String-in-ROM text.
#define SPLIT_ACROSS_LINES | ( | label, | |
... | |||
) |
Label a block of text that is split across multiple log lines.
label | specifies the text label to be used to identify the block. |
The LogMessageRecord::splitLongLogLine() routine is used to perform the actual split across multiple lines.
#define SUGGESTED_DEFAULT_MAX_LOG_LINES 1024 |
Recommended default amount of maximum buffered log lines.
#define THIS_COMPONENT_AS_STRING __LOGAPI_EXPAND_STRING2(THIS_COMPONENT) |
Provides the value of THIS_COMPONENT as a text string or const char[] value.
#define THIS_COMPONENT_LEVEL | ( | level | ) | COMPONENT_LEVEL(THIS_COMPONENT, level) |
Compose a symbolic log mask name for the default component and level.
level | names the log level (e.g., info, error, trace, etc.) |
#define THIS_COMPONENT_LOG_MANAGER LogManager::DEFAULT_LogManager |
Defines the default log manager object for the component.
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.
#define THIS_COMPONENT_LOG_MASK COMPONENT_LOG_MASK(THIS_COMPONENT) |
Construct variable name for the default component's active log mask.
#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.
baseLevel | identifies 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. |
N | specifies the relative user-specific mask instance, starting at 1. |
#define USE_GETTID_FOR_THREADID 0 |
Permits use of gettid() rather than pthread_self() for thread Id on Linux.
#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
#define WITH_TIME_LEVEL logObj.writeAsTextToBuffer(LogMessageRecord::LOG_TIMESTAMP | LogMessageRecord::LOG_ERROR_LEVEL); } while (0) |
log as $time $log_level $msg
typedef uint_fast32_t LogMaskPrimitiveType_t |
typedef const struct StringInROM_struct* StringInROM |
Typedef to mark string data in text segment.
anonymous enum |
|
inline |
Add binary string argument with known length.
logRec | references the LogMessageRecord being prepared. |
arg | is the block of binary data to be added to the log message. |
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.
|
inline |
Add text string argument.
logRec | references the LogMessageRecord being prepared. |
arg | points to the string argument be added to the log message. |
References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_CHAR.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_DOUBLE.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_FLOAT.
|
inline |
Add binary string argument with known length.
logRec | references the LogMessageRecord being prepared. |
arg | is the block of data to be added as hexadecimal data to the log message. |
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.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_INT32.
Referenced by LogMessageRecord::splitLongLogLine().
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_INT64.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is 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.
void addLogArg | ( | LogMessageRecord & | logRec, |
const size_t | arg | ||
) |
void addLogArg | ( | LogMessageRecord & | logRec, |
const ssize_t | arg | ||
) |
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT.
|
inline |
Add text string argument with known length.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
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.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_UINT32.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG, and LogMessageRecord::LOG_ARG_TYPE_UINT64.
|
inline |
Add log argument of indicated type.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_POINTER.
|
inline |
Add log argument representing a pointer.
logRec | references the LogMessageRecord being prepared. |
arg | is the argument to be added to the log message. |
l | is 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.
|
inline |
Add text string data which is expected to be permanently available.
logRec | references the LogMessageRecord being prepared. |
arg | points to the string to be added to the log message. |
References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_ROM_TEXT.
|
inline |
Add text string argument with known length.
logRec | references the LogMessageRecord being prepared. |
len | specifies the number of bytes to be copied from the string. |
arg | points to the start of the string contents. |
References _ADD_NEW_LOG_ARG_WITH_VALUE_AND_LEN, and LogMessageRecord::LOG_ARG_TYPE_TEXT_FRAGMENT.
LogMaskType_t COMPONENT_LOG_MASK | ( | io | ) |
Default io-or-library-related log mask.
DEFINE_COMPONENT_LOG_MASKS | ( | app | ) |
DEFINE_COMPONENT_LOG_MASKS | ( | io | ) |
|
inline |
Called when too many arguments are output.
arg | references the argument that cannot be output. |
References LogMessageRecord::argCountExceeded, LogMessageRecord::LOG_MAX_ARGUMENT_TOTAL, LogMessageRecord::sourceFile, and LogMessageRecord::sourceLine.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
Output a POSIXtimeInNanoseconds into a LogMessageRecord.
logRec | references the LogMessageRecord being prepared. |
arg | is the nanoseconds to be added to the log message. |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References __EXPLICIT_LOG_MESSAGE_BODY.
|
inline |
References BinaryBlock_struct::bfrLen, and BinaryBlock_struct::dataBfr.
|
inline |
|
inline |
|
inline |
References TextBlock_struct::bfrLen, and TextBlock_struct::textBfr.
|
inline |
Convert StringInROM type back to true const char *
for output on std::ostream.
os | references the output stream |
arg | is the string to be output. |
|
inline |
References buffer.
|
inline |
References buffer.
|
inline |
References s.
|
inline |
|
inline |
|
inline |
References s.
LogMaskType_t COMPONENT_LOG_MASK(io) | ( | app | ) |
Default application log mask; will be aliased to component.
Default io-or-library-related log mask.
struct LogSubsystemInfo default_LogSubsystemInfo |
Default descriptive information for Logging subsystem.
Referenced by LogManager::initializeLogSubsystem(), LogManager::newLogFileForComponent(), LogManager::newLogToFileDescriptor(), and LogManager::newStandardLogFile().
![]() | Generated: Tue Jul 28 2020 16:03:26
Support Information |