Logging functions
Logs a fatal message to the standard error output and aborts the program
XS_EXPORT void XSFatalErrorWithInfos(
const char *file,
int line,
const char *func,
const char *fmt,
... ) XS_NORETURN_ATTRIBUTE;
Do not use this function directly. Use the XSFatalError macro instead.
Gets the log level for XSLog functions/macros
XS_EXPORT int64_t XSGetLogLevel(
void );
The actual log level
Logs a message to the standard error output
XS_EXPORT void XSLogWithInfos(
XSLogLevel level,
const char *file,
int line,
const char *func,
const char *fmt,
... );
Do not use this function directly. Use the XSLog... macros instead.
Sets the log level for XSLog functions/macros
XS_EXPORT void XSSetLogLevel(
int64_t level );
Logs the description of an object to the console
XS_EXPORT void XSShowWithInfos(
XSObjectRef object,
const char *file,
int line,
const char *func );
Do not use this function directly. Use the XSShow macro instead.
Logs the description of an object to the console
XS_EXPORT void XSShowWithInfos(
XSObjectRef object,
const char *file,
int line,
const char *func );
Do not use this function directly. Use the XSShow macro instead.
Logs a message to the standard error output
XS_EXPORT void XSVLogWithInfos(
XSLogLevel level,
const char *file,
int line,
const char *func,
const char *fmt,
va_list args );
Do not use this function directly. Use the XSVLog... macros instead.
Issues a fatal error message and aborts the program
#ifdef DEBUG
#define XSFatalError( ... ) XSFatalErrorWithInfos( __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSFatalError( ... ) XSFatalErrorWithInfos( NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (info level) to the standard error output
#ifdef DEBUG
#define XSLog( ... ) XSLogWithInfos( XSLogLevelInfo, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLog( ... ) XSLogWithInfos( XSLogLevelInfo, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (alert level) to the standard error output
#ifdef DEBUG
#define XSLogAlert( ... ) XSLogWithInfos( XSLogLevelAlert, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogAlert( ... ) XSLogWithInfos( XSLogLevelAlert, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (critical level) to the standard error output
#ifdef DEBUG
#define XSLogCritical( ... ) XSLogWithInfos( XSLogLevelCritical, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogCritical( ... ) XSLogWithInfos( XSLogLevelCritical, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (debug level) to the standard error output
#ifdef DEBUG
#define XSLogDebug( ... ) XSLogWithInfos( XSLogLevelDebug, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogDebug( ... ) XSLogWithInfos( XSLogLevelDebug, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (emergency level) to the standard error output
#ifdef DEBUG
#define XSLogEmergency( ... ) XSLogWithInfos( XSLogLevelEmergency, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogEmergency( ... ) XSLogWithInfos( XSLogLevelEmergency, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (error level) to the standard error output
#ifdef DEBUG
#define XSLogError( ... ) XSLogWithInfos( XSLogLevelError, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogError( ... ) XSLogWithInfos( XSLogLevelError, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (info level) to the standard error output
#ifdef DEBUG
#define XSLogInfo( ... ) XSLogWithInfos( XSLogLevelInfo, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogInfo( ... ) XSLogWithInfos( XSLogLevelInfo, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (notice level) to the standard error output
#ifdef DEBUG
#define XSLogNotice( ... ) XSLogWithInfos( XSLogLevelNotice, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogNotice( ... ) XSLogWithInfos( XSLogLevelNotice, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs a message (warning level) to the standard error output
#ifdef DEBUG
#define XSLogWarning( ... ) XSLogWithInfos( XSLogLevelWarning, __FILE__, __LINE__, __func__, __VA_ARGS__ )
#else
#define XSLogWarning( ... ) XSLogWithInfos( XSLogLevelWarning, NULL, 0, NULL, __VA_ARGS__ )
#endif
Logs the description of an object to the console
#ifdef DEBUG
#define XSShow( _obj_ ) XSShowWithInfos( _obj_, __FILE__, __LINE__, __func__ )
#else
#define XSShow( _obj_ ) XSShowWithInfos( _obj_, NULL, 0, NULL )
#endif
Logs a message (info level) to the standard error output
#ifdef DEBUG
#define XSVLog( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelInfo, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLog( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelInfo, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (alert level) to the standard error output
#ifdef DEBUG
#define XSVLogAlert( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelAlert, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogAlert( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelAlert, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (critical level) to the standard error output
#ifdef DEBUG
#define XSVLogCritical( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelCritical, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogCritical( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelCritical, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (debug level) to the standard error output
#ifdef DEBUG
#define XSVLogDebug( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelDebug, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogDebug( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelDebug, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (emergency level) to the standard error output
#ifdef DEBUG
#define XSVLogEmergency( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelEmergency, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogEmergency( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelEmergency, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (error level) to the standard error output
#ifdef DEBUG
#define XSVLogError( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelError, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogError( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelError, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (info level) to the standard error output
#ifdef DEBUG
#define XSVLogInfo( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelInfo, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogInfo( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelInfo, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (notice level) to the standard error output
#ifdef DEBUG
#define XSVLogNotice( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelNotice, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogNotice( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelNotice, NULL, 0, NULL, _fmt_, _args_ )
#endif
Logs a message (warning level) to the standard error output
#ifdef DEBUG
#define XSVLogWarning( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelWarning, __FILE__, __LINE__, __func__, _fmt_, _args_ )
#else
#define XSVLogWarning( _fmt_, _args_ ) XSLogWithInfos( XSLogLevelWarning, NULL, 0, NULL, _fmt_, _args_ )
#endif