HDK
|
#include <PDG_LogUtils.h>
Static Public Member Functions | |
static fpreal | currentTime () |
static int | verbosity () |
Returns the current verbosity. More... | |
static void | setVerbosity (int verbosity) |
Sets the verbosity. More... | |
static bool | configureFromEnvironment (bool force) |
static void | enableAll () |
Enables all logging with the maximum log level for each log type. More... | |
static void | disableAll () |
Disables all logging across all log types. More... | |
template<LogType Type, typename Level , typename... Args> | |
static void | debugLog (Level level, const char *fmt, Args &&...args) |
template<typename Level > | |
static Level | logLevel (LogType type) |
Returns the log level for the specified log type. More... | |
template<typename Level > | |
static void | setLogLevel (LogType type, Level level) |
Sets the log level for the specified log type. More... | |
static void | workItemLog (WorkItemDebug level, UT_ErrorSeverity severity, const PDG_WorkItem *work_item, const UT_StringHolder &tag, fpreal time_stamp) |
Writes a work item output message to stdout. More... | |
static void | nodeLog (NodeDebug level, const PDG_Node *node, const UT_StringHolder &tag, const UT_StringHolder &message) |
Writes a verbose node output message to stdout. More... | |
static void | schedulerLog (SchedulerDebug level, const PDG_Scheduler *scheduler, const PDG_WorkItem *work_item, const UT_StringHolder &tag, const UT_StringHolder &message) |
Writes a verbose scheduler output message to stdout. More... | |
static void | schedulerLog (SchedulerDebug level, const PDG_Scheduler *scheduler, PDG_WorkItemID work_item, const UT_StringHolder &tag, const UT_StringHolder &message) |
static void | serviceLog (ServiceDebug level, PDG_WorkItemID work_item_id, const UT_StringHolder &service_name, const UT_StringHolder &client_name, const UT_StringHolder &tag) |
Writes a service log message to stdout. More... | |
static void | typeLog (PDGT_TypeErrorLevel level, const UT_StringHolder &message, const UT_StringHolder &tag) |
Writes a type registration log message to stdout. More... | |
static void | writeLog (const UT_StringHolder &source, const UT_StringHolder &message) |
Writes a generic log message to stdout. More... | |
Friends | |
class | pdg_UniversalLogWorkItemStatusSource |
Definition at line 30 of file PDG_LogUtils.h.
Enumeration of cache debug log levels
Definition at line 145 of file PDG_LogUtils.h.
Enumeration of expression debug log levels
Definition at line 166 of file PDG_LogUtils.h.
Enumeration of log types
Enumerator | |
---|---|
eLogTypeCache |
Cache and handler logging. |
eLogTypeExpr |
Expression evaluation logging. |
eLogTypeNode |
Node status/debug logging. |
eLogTypeScheduler |
Scheduler status/debug logging. |
eLogTypeService |
Service client status/debug logging. |
eLogTypeWorkItem |
Work item status/debug logging. |
eLogTypeTransfer |
File transer debug logging. |
eLogTypeTypeRegistration |
Type registration errors and warnings. |
eLogTypeCount |
Total number of log types, should always be last. |
Definition at line 36 of file PDG_LogUtils.h.
Enumeration of node debug log levels
Definition at line 69 of file PDG_LogUtils.h.
Enumeration of scheduler debug log levels
Definition at line 90 of file PDG_LogUtils.h.
Enumeration of service debug log levels
Definition at line 106 of file PDG_LogUtils.h.
Emumeration of file trasfer debug log levels
Definition at line 182 of file PDG_LogUtils.h.
Enumeration of work item log levels
Enumerator | |
---|---|
eWorkItemDebugNone |
No work item logging. |
eWorkItemDebugScheduled |
Work item status updates for scheduled work items. |
eWorkItemDebugAll |
Work item status updates for all work items. |
Definition at line 130 of file PDG_LogUtils.h.
|
static |
Sets the log level variables from the environment. If custom log levels have been set using setLogLevel(..), then this method only makes change if force=true. Returns true if the log levels were updated, else false.
|
static |
Returns the current time stamp as a floating point value. This is different than calling SYStime() because it's adjusted to be relative to the unix epoch, rather than an aribtrary value that isn't cross platform. It's also different than just calling time(nullptr) because it still includes milliseconds like SYStime().
|
inlinestatic |
Writes a typed logged message to stdout, assuming the log level is set appropriately
Definition at line 236 of file PDG_LogUtils.h.
|
static |
Disables all logging across all log types.
|
static |
Enables all logging with the maximum log level for each log type.
|
inlinestatic |
Returns the log level for the specified log type.
Definition at line 253 of file PDG_LogUtils.h.
|
static |
Writes a verbose node output message to stdout.
|
static |
Writes a verbose scheduler output message to stdout.
|
static |
Writes a verbose scheduler output message to stdout, including a work item ID
|
static |
Writes a service log message to stdout.
|
inlinestatic |
Sets the log level for the specified log type.
Definition at line 261 of file PDG_LogUtils.h.
Sets the verbosity.
Definition at line 215 of file PDG_LogUtils.h.
|
static |
Writes a type registration log message to stdout.
|
inlinestatic |
Returns the current verbosity.
Definition at line 211 of file PDG_LogUtils.h.
|
static |
Writes a work item output message to stdout.
|
static |
Writes a generic log message to stdout.
|
friend |
Definition at line 324 of file PDG_LogUtils.h.