Vuo  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions

Description

Macros to help with debugging.

Macros

#define VL()
 Prints the name of the file and function to the system log and to stderr (and implicitly flushes the output buffer).
 
#define VLog(format,...)
 Prints the name of the file and function, and printf()-style format/arguments, to the system log and to stderr (and implicitly flushes the output buffer).
 
#define VUserLog(format,...)
 Same as VLog, but for messages intended for end users.
 
#define VDebugLog(format,...)
 Same as VLog, but for debug messages intended for end users.
 
#define VLogHeap(heapPointer)
 Prints the name of the current file and function, and the address and description of the specified heapPointer, to the system log and to stderr (and implicitly flushes the output buffer).
 
#define VUOLOG_PROFILE_BEGIN(object)
 Starts a profiler time sample.
 
#define VUOLOG_PROFILE_END(object)
 Ends a profiler time sample.
 

Functions

double VuoLogGetTime (void)
 Returns the number of seconds (including fractional seconds) since an arbitrary start time.
 
double VuoLogGetElapsedTime (void)
 Returns the number of seconds (including fractional seconds) since this module was loaded.
 
bool VuoIsDebugEnabled (void)
 Returns true if debug mode is enabled.
 
char * VuoLog_copyCFDescription (const void *variable)
 Returns a C string description of variable, a reference to a CoreFoundation object.
 
void VuoLog_backtrace (void)
 Prints the stack backtrace to stderr.
 
void VuoLog (const char *file, const unsigned int line, const char *function, const char *format,...)
 Outputs a message to the system log and to stderr.
 
void VuoLog_recordTime (const char *name, double time)
 Adds time to the specified profile name.
 

Macro Definition Documentation

#define VDebugLog (   format,
  ... 
)

Same as VLog, but for debug messages intended for end users.

#define VL ( )

Prints the name of the file and function to the system log and to stderr (and implicitly flushes the output buffer).

Example:
void nodeEvent()
{
VL();
}
#define VLog (   format,
  ... 
)

Prints the name of the file and function, and printf()-style format/arguments, to the system log and to stderr (and implicitly flushes the output buffer).

Use this for debugging only; don't commit files with VLog calls. To log messages intended for end users, see VUserLog.

Example:
void nodeEvent(VuoInputData(VuoInteger, "42") number)
{
VLog("%d", number);
}
#define VLogHeap (   heapPointer)

Prints the name of the current file and function, and the address and description of the specified heapPointer, to the system log and to stderr (and implicitly flushes the output buffer).

Example:
{
VLogHeap(shader);
}
#define VUOLOG_PROFILE_BEGIN (   object)

Starts a profiler time sample.

In this macro's parameter, pass a text identifier for the time sample (such as the variable name of a libdispatch queue or semaphore).

Example:
#define VUOLOG_PROFILE_END (   object)

Ends a profiler time sample.

#define VUserLog (   format,
  ... 
)

Same as VLog, but for messages intended for end users.

Function Documentation

bool VuoIsDebugEnabled ( void  )

Returns true if debug mode is enabled.

Users can enable debug mode by executing defaults write org.vuo.Editor debug -boolean true, and can disable it by executing defaults delete org.vuo.Editor debug.

Nodes should use this to control verbose logging.

void VuoLog ( const char *  file,
const unsigned int  line,
const char *  function,
const char *  format,
  ... 
)

Outputs a message to the system log and to stderr.

Also stores the most recent 2 messages in the OS X CrashReporter data structure, to be included with crash reports.

void VuoLog_backtrace ( void  )

Prints the stack backtrace to stderr.

char* VuoLog_copyCFDescription ( const void *  variable)

Returns a C string description of variable, a reference to a CoreFoundation object.

The caller is responsible for free()ing the returned string.

void VuoLog_recordTime ( const char *  name,
double  time 
)

Adds time to the specified profile name.

double VuoLogGetElapsedTime ( void  )

Returns the number of seconds (including fractional seconds) since this module was loaded.

double VuoLogGetTime ( void  )

Returns the number of seconds (including fractional seconds) since an arbitrary start time.