HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ErrorLog Class Reference

#include <UT_ErrorLog.h>

Classes

class  ErrorCallback
 Functor to handle errors printed out using the mantra* methods. More...
 

Public Types

using HeaderCallback = UT_Function< void(UT_WorkBuffer &)>
 
typedef int(* MantraVerboseCallback )()
 
typedef int(* MantraColorCallback )()
 
typedef bool(* MantraTimestampCallback )()
 

Public Member Functions

 UT_ErrorLog ()
 
 ~UT_ErrorLog ()
 
void logError (const UT_Error *)
 
const UT_StringgetLogFileName () const
 
void setLogFileName (const UT_String &name)
 
int getMinLevel () const
 
void setMinLevel (const int level)
 
int getMinConsoleLevel () const
 
void setMinConsoleLevel (const int level)
 
bool getDoLogging () const
 
void setDoLogging (bool log)
 
bool getLogToConsole () const
 
void setLogToConsole (bool log)
 
bool getForceConsoleColor () const
 
void setForceConsoleColor (bool log)
 
bool getLogToSystem () const
 
void setLogToSystem (bool log)
 
const UT_StringHoldergetPrefix () const
 
void setPrefix (const UT_StringHolder &prefix)
 
bool getAppendDate () const
 
void setAppendDate (bool append_date)
 
void resetState ()
 
void setMaxLogSize (int64 size)
 
void setHeaderCallback (HeaderCallback callback)
 

Static Public Member Functions

static void registerCallback (ErrorCallback *err)
 If you want to un-register the callback, just delete the object. More...
 
static const UT_StringHolderuniversalLogSourceName ()
 Get the universal logging source name for this log source. More...
 
static void setMantraVerboseLevel (int level)
 
static int getMantraVerboseLevel ()
 
static bool isMantraVerbose (int level)
 
static void setMantraElapsedTime (bool enable)
 
static bool mantraElapsedTime ()
 
static void setMantraVerboseCallback (MantraVerboseCallback cb)
 
static void setMantraColorCallback (MantraColorCallback cb)
 
static void setMantraTimestampCallback (MantraTimestampCallback cb)
 
static int mantraPrintf (int level, const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
 
static int static int mantraWarning (const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(1
 
static int static int static int mantraError (const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(1
 
static int mantraPrintfOnce (int level, const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
 
static int static int mantraWarningOnce (const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(1
 
static int static int static int mantraErrorOnce (const char *msg,...) SYS_PRINTF_CHECK_ATTRIBUTE(1
 
static int static int static
int static void 
clearMantraOnceErrors ()
 
static void printErrorToConsole (const char *msg, const char *prefix="", bool enable_color=false)
 
static void printWarningToConsole (const char *msg, const char *prefix="", bool enable_color=false)
 
static void printMessageToConsole (const char *msg, const char *prefix="", bool enable_color=false)
 
template<typename... Args>
static int static int static
int static size_t 
format (int lev, const char *fmt, const Args &...args)
 
template<typename... Args>
static size_t warning (const char *fmt, const Args &...args)
 
template<typename... Args>
static size_t error (const char *fmt, const Args &...args)
 
template<typename... Args>
static size_t formatOnce (int lev, const char *fmt, const Args &...args)
 
template<typename... Args>
static size_t warningOnce (const char *fmt, const Args &...args)
 
template<typename... Args>
static size_t errorOnce (const char *fmt, const Args &...args)
 

Detailed Description

Definition at line 27 of file UT_ErrorLog.h.

Member Typedef Documentation

typedef int(* UT_ErrorLog::MantraColorCallback)()

Definition at line 156 of file UT_ErrorLog.h.

typedef bool(* UT_ErrorLog::MantraTimestampCallback)()

Definition at line 157 of file UT_ErrorLog.h.

typedef int(* UT_ErrorLog::MantraVerboseCallback)()

Definition at line 155 of file UT_ErrorLog.h.

Constructor & Destructor Documentation

UT_ErrorLog::UT_ErrorLog ( )
UT_ErrorLog::~UT_ErrorLog ( )

Member Function Documentation

static int static int static int static void UT_ErrorLog::clearMantraOnceErrors ( )
static
template<typename... Args>
static size_t UT_ErrorLog::error ( const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Definition at line 204 of file UT_ErrorLog.h.

template<typename... Args>
static size_t UT_ErrorLog::errorOnce ( const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Examples:
karma_procedurals/BRAY_HdBox.C.

Definition at line 231 of file UT_ErrorLog.h.

template<typename... Args>
static int static int static int static size_t UT_ErrorLog::format ( int  lev,
const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Definition at line 186 of file UT_ErrorLog.h.

template<typename... Args>
static size_t UT_ErrorLog::formatOnce ( int  lev,
const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Definition at line 212 of file UT_ErrorLog.h.

bool UT_ErrorLog::getAppendDate ( ) const
inline

Definition at line 126 of file UT_ErrorLog.h.

bool UT_ErrorLog::getDoLogging ( ) const
inline

Definition at line 93 of file UT_ErrorLog.h.

bool UT_ErrorLog::getForceConsoleColor ( ) const
inline

Definition at line 106 of file UT_ErrorLog.h.

const UT_String& UT_ErrorLog::getLogFileName ( ) const
inline

Definition at line 67 of file UT_ErrorLog.h.

bool UT_ErrorLog::getLogToConsole ( ) const
inline

Definition at line 99 of file UT_ErrorLog.h.

bool UT_ErrorLog::getLogToSystem ( ) const
inline

Definition at line 112 of file UT_ErrorLog.h.

static int UT_ErrorLog::getMantraVerboseLevel ( )
static
int UT_ErrorLog::getMinConsoleLevel ( ) const
inline

Definition at line 85 of file UT_ErrorLog.h.

int UT_ErrorLog::getMinLevel ( ) const
inline

Definition at line 77 of file UT_ErrorLog.h.

const UT_StringHolder& UT_ErrorLog::getPrefix ( ) const
inline

Definition at line 119 of file UT_ErrorLog.h.

static bool UT_ErrorLog::isMantraVerbose ( int  level)
static
void UT_ErrorLog::logError ( const UT_Error )
static bool UT_ErrorLog::mantraElapsedTime ( )
static
static int static int static int UT_ErrorLog::mantraError ( const char *  msg,
  ... 
)
static
static int static int static int UT_ErrorLog::mantraErrorOnce ( const char *  msg,
  ... 
)
static
static int UT_ErrorLog::mantraPrintf ( int  level,
const char *  msg,
  ... 
)
static
static int UT_ErrorLog::mantraPrintfOnce ( int  level,
const char *  msg,
  ... 
)
static
static int static int UT_ErrorLog::mantraWarning ( const char *  msg,
  ... 
)
static
static int static int UT_ErrorLog::mantraWarningOnce ( const char *  msg,
  ... 
)
static
static void UT_ErrorLog::printErrorToConsole ( const char *  msg,
const char *  prefix = "",
bool  enable_color = false 
)
static
static void UT_ErrorLog::printMessageToConsole ( const char *  msg,
const char *  prefix = "",
bool  enable_color = false 
)
static
static void UT_ErrorLog::printWarningToConsole ( const char *  msg,
const char *  prefix = "",
bool  enable_color = false 
)
static
static void UT_ErrorLog::registerCallback ( ErrorCallback err)
static

If you want to un-register the callback, just delete the object.

void UT_ErrorLog::resetState ( )
inline

Definition at line 136 of file UT_ErrorLog.h.

void UT_ErrorLog::setAppendDate ( bool  append_date)
inline

Definition at line 130 of file UT_ErrorLog.h.

void UT_ErrorLog::setDoLogging ( bool  log)
inline

Definition at line 95 of file UT_ErrorLog.h.

void UT_ErrorLog::setForceConsoleColor ( bool  log)
inline

Definition at line 108 of file UT_ErrorLog.h.

void UT_ErrorLog::setHeaderCallback ( HeaderCallback  callback)
inline

Definition at line 148 of file UT_ErrorLog.h.

void UT_ErrorLog::setLogFileName ( const UT_String name)
inline

Definition at line 69 of file UT_ErrorLog.h.

void UT_ErrorLog::setLogToConsole ( bool  log)
inline

Definition at line 101 of file UT_ErrorLog.h.

void UT_ErrorLog::setLogToSystem ( bool  log)
inline

Definition at line 114 of file UT_ErrorLog.h.

static void UT_ErrorLog::setMantraColorCallback ( MantraColorCallback  cb)
static
static void UT_ErrorLog::setMantraElapsedTime ( bool  enable)
static
static void UT_ErrorLog::setMantraTimestampCallback ( MantraTimestampCallback  cb)
static
static void UT_ErrorLog::setMantraVerboseCallback ( MantraVerboseCallback  cb)
static
static void UT_ErrorLog::setMantraVerboseLevel ( int  level)
static
void UT_ErrorLog::setMaxLogSize ( int64  size)
inline

Definition at line 143 of file UT_ErrorLog.h.

void UT_ErrorLog::setMinConsoleLevel ( const int  level)
inline

Definition at line 87 of file UT_ErrorLog.h.

void UT_ErrorLog::setMinLevel ( const int  level)
inline

Definition at line 79 of file UT_ErrorLog.h.

void UT_ErrorLog::setPrefix ( const UT_StringHolder prefix)
inline

Definition at line 121 of file UT_ErrorLog.h.

static const UT_StringHolder& UT_ErrorLog::universalLogSourceName ( )
static

Get the universal logging source name for this log source.

template<typename... Args>
static size_t UT_ErrorLog::warning ( const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Definition at line 195 of file UT_ErrorLog.h.

template<typename... Args>
static size_t UT_ErrorLog::warningOnce ( const char *  fmt,
const Args &...  args 
)
inlinestatic

Use UTformat to format messages

Definition at line 222 of file UT_ErrorLog.h.


The documentation for this class was generated from the following file: