Defines debug logging functions.
The priority at which a message should be logged. The platform may be configured to filter logs by priority, or render them differently.
Values
kSbLogPriorityUnknown
kSbLogPriorityInfo
kSbLogPriorityWarning
kSbLogPriorityError
kSbLogPriorityFatal
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Compatibility with base/logging.h which defines ERROR to be 0 to workaround some system header defines that do the same thing.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Note that this macro's definition varies depending on the values of one or more other variables.
Declaration
SB_EXPORT void Break();
Declaration
SB_EXPORT SbLogPriority GetMinLogLevel();
Description
Writes message
to the platform's debug output log.
Declaration and definitions
#include "starboard/log.h" void SbLog(SbLogPriority /*priority*/, const char* /*message*/) { }
Parameters
Description
Flushes the log buffer on some platforms.
Declaration and definitions
#include "starboard/log.h" void SbLogFlush() { }
Description
A log output method that additionally performs a string format on the data being logged.
Declaration and definitions
#include "starboard/log.h" void SbLogFormat(const char* /*format*/, va_list /*arguments*/) { }
Parameters
Description
Inline wrapper of SbLogFormat that converts from ellipsis to va_args.
Declaration
static SB_C_INLINE void SbLogFormatF(const char* format, ...) SB_PRINTF_FORMAT(1, 2); void SbLogFormatF(const char* format, ...) { va_list args; va_start(args, format); SbLogFormat(format, args); va_end(args); }
Parameters
Description
Indicates whether the log output goes to a TTY or is being redirected.
Declaration and definitions
#include "starboard/log.h" bool SbLogIsTty() { return false; }
Description
A bare-bones log output method that is async-signal-safe, i.e. safe to call from an asynchronous signal handler (e.g. a SIGSEGV
handler). It should not do any additional formatting.
Declaration and definitions
#include "starboard/log.h" void SbLogRaw(const char* /*message*/) { }
Parameters
Description
Dumps the stack of the current thread to the log in an async-signal-safe manner, i.e. safe to call from an asynchronous signal handler (e.g. a SIGSEGV
handler). Does not include SbLogRawDumpStack itself.
Declaration and definitions
#include "starboard/log.h" void SbLogRawDumpStack(int /*frames_to_skip*/) { }
Parameters
Description
A formatted log output method that is async-signal-safe, i.e. safe to call from an asynchronous signal handler (e.g. a SIGSEGV
handler).
Declaration and definitions
#include "starboard/log.h" void SbLogRawFormat(const char* /*format*/, va_list /*arguments*/) { }
Parameters
Description
Inline wrapper of SbLogFormat to convert from ellipsis to va_args.
Declaration
static SB_C_INLINE void SbLogRawFormatF(const char* format, ...) SB_PRINTF_FORMAT(1, 2); void SbLogRawFormatF(const char* format, ...) { va_list args; va_start(args, format); SbLogRawFormat(format, args); va_end(args); }
Parameters
Declaration
SB_EXPORT void SetMinLogLevel(SbLogPriority level);
Parameters
Declaration
// SB_EXPORT'd. Using SB_EXPORT here directly causes issues on Windows because // it uses std classes which also need to be exported. class LogMessage { public: LogMessage(const char* file, int line, SbLogPriority priority);
Parameters
Declaration
static int count = 0; \ if (0 == count++) { \ SbLog(kSbLogPriorityError, SB_NOTIMPLEMENTED_MSG); \ } \ } while (0) #endif #endif // __cplusplus #endif // STARBOARD_LOG_H_
Parameters