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

typedef int(* MantraVerboseCallback )(void)
 
typedef int(* MantraColorCallback )(void)
 
typedef bool(* MantraTimestampCallback )(void)
 

Public Member Functions

 UT_ErrorLog ()
 
 ~UT_ErrorLog ()
 
void logError (UT_Error *)
 
const UT_StringgetLogFileName () const
 
void setLogFileName (const UT_String &name)
 
int getMinLevel () const
 
void setMinLevel (const int level)
 
bool getDoLogging () const
 
void setDoLogging (bool log)
 
void resetState ()
 

Static Public Member Functions

static void registerCallback (ErrorCallback *err)
 If you want to un-register the callback, just delete the object. 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 ()
 
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 23 of file UT_ErrorLog.h.

Member Typedef Documentation

typedef int(* UT_ErrorLog::MantraColorCallback)(void)

Definition at line 86 of file UT_ErrorLog.h.

typedef bool(* UT_ErrorLog::MantraTimestampCallback)(void)

Definition at line 87 of file UT_ErrorLog.h.

typedef int(* UT_ErrorLog::MantraVerboseCallback)(void)

Definition at line 85 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 134 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

Definition at line 161 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 116 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 142 of file UT_ErrorLog.h.

bool UT_ErrorLog::getDoLogging ( ) const
inline

Definition at line 71 of file UT_ErrorLog.h.

const UT_String& UT_ErrorLog::getLogFileName ( ) const
inline

Definition at line 56 of file UT_ErrorLog.h.

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

Definition at line 66 of file UT_ErrorLog.h.

static bool UT_ErrorLog::isMantraVerbose ( int  level)
static
void UT_ErrorLog::logError ( 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::registerCallback ( ErrorCallback err)
static

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

void UT_ErrorLog::resetState ( )
inline

Definition at line 76 of file UT_ErrorLog.h.

void UT_ErrorLog::setDoLogging ( bool  log)
inline

Definition at line 73 of file UT_ErrorLog.h.

void UT_ErrorLog::setLogFileName ( const UT_String name)
inline

Definition at line 58 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::setMinLevel ( const int  level)
inline

Definition at line 68 of file UT_ErrorLog.h.

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

Use UTformat to format messages

Definition at line 125 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 152 of file UT_ErrorLog.h.


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