VuoLog implementation.
Definition in file VuoLog.cc.
Go to the source code of this file.
Classes | |
struct | VuoCrashReport_infoType |
Data to be inserted into macOS crash reports. More... | |
struct | NSOperatingSystemVersion |
Return value of -[NSProcessInfo operatingSystemVersion] , from NSProcessInfo.h . More... | |
Macros | |
#define | VuoCrashReport_alignment __attribute__((aligned(8))) |
Align on 8-byte boundaries. | |
Functions | |
void | VuoTerminateHandler () |
Log the timestamp at which std::terminate was called, so we can tell whether the logged exceptions are related to it. | |
double | VuoLogGetTime (void) |
Returns the number of seconds (including fractional seconds) since an arbitrary start time. | |
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. | |
void | VuoLog_statusF (const char *moduleName, const char *file, const unsigned int linenumber, const char *function, const char *format,...) |
Helper for VuoLog_status. | |
static NSOperatingSystemVersion | VuoLog_getOSVersion (void) |
Returns the current operating system version. | |
static void | VuoLog_dylibLoaded (const struct mach_header *mh32, intptr_t vmaddr_slide) |
Helper for VuoLog_isDebuggerAttached. | |
bool | VuoLog_isDebuggerAttached (void) |
Returns true if the current process is being debugged (either launched by LLDB/Instruments, or LLDB/Instruments attached after the process launched). | |
void | VuoLog (const char *moduleName, const char *file, const unsigned int linenumber, const char *function, const char *format,...) |
Outputs a message to the system log and to stderr . | |
bool | VuoIsDebugEnabled (void) |
Returns true if debug mode is enabled. | |
void | VuoLog_backtrace (void) |
Prints the stack backtrace to stderr. | |
void | VuoLog_replaceString (char *wholeString, const char *substringToRemove, const char *replacement) |
Removes all occurrences of a substring. | |
vector< string > | VuoLog_getBacktrace (void) |
Returns the stack backtrace. | |
Variables | |
static std::terminate_handler | nextTerminateHandler = nullptr |
The existing std::terminate handler before we installed ours. | |
dispatch_queue_t | VuoLog_utf8LocaleQueue = NULL |
Serializes access to VuoText_utf8Locale. | |
locale_t | VuoLog_utf8Locale = NULL |
A shared UTF-8 locale object, initialized at startup. | |
double | VuoLogStartTime |
The time when this module was loaded. | |
const int | VuoLogHistoryItems = 20 |
How many VLog messages to include in crash reports. | |
char * | VuoLogHistory [VuoLogHistoryItems] |
VLog messages to include in crash reports. | |
dispatch_queue_t | VuoLogHistoryQueue |
Serializes access to VuoLogHistory. | |
static pthread_t | VuoLog_mainThread = nullptr |
To later identify which is the main thread. | |
static const char * | VuoLog_executableName = nullptr |
The process's main executable name (as opposed to VuoLog_moduleName, the dylib the log function was called from). | |
static bool | VuoLog_isInstrumentsFrameworkLoaded = false |
True if DVTInstrumentsFoundation.framework is loaded in the current process (i.e., if the process has been launched for debugging with Instruments.app). | |
struct VuoCrashReport_infoType |
#define VuoCrashReport_alignment __attribute__((aligned(8))) |
|
static |
Helper for VuoLog_isDebuggerAttached.
vector< string > VuoLog_getBacktrace | ( | void | ) |
|
static |
void VuoLog_replaceString | ( | char * | wholeString, |
const char * | substringToRemove, | ||
const char * | replacement | ||
) |
void VuoTerminateHandler | ( | ) |
|
static |
|
static |
The process's main executable name (as opposed to VuoLog_moduleName, the dylib the log function was called from).
|
static |
|
static |
locale_t VuoLog_utf8Locale = NULL |
dispatch_queue_t VuoLog_utf8LocaleQueue = NULL |
char* VuoLogHistory[VuoLogHistoryItems] |
const int VuoLogHistoryItems = 20 |
dispatch_queue_t VuoLogHistoryQueue |
Serializes access to VuoLogHistory.