Code Listener
[unstable] git snapshot
|
Macros for emitting error, warning, info and debug messages through the code listener interface. More...
Go to the source code of this file.
Macros | |
#define | CL_DIE(msg) |
emit a fatal error message and ask the code listener peer to shoot down the process More... | |
#define | CL_MSG_STREAM(fnc, to_stream) |
standard output stream wrapper on top of the code listener interface More... | |
#define | CL_MSG_STREAM_INTERNAL(fnc, to_stream) |
wrapper around CL_MSG_STREAM decorating the message by internal location info More... | |
#define | CL_DEBUG(to_stream) CL_MSG_STREAM_INTERNAL(cl_debug, "debug: " << to_stream) |
emit a debug message with internal location info More... | |
#define | CL_WARN(to_stream) CL_MSG_STREAM_INTERNAL(cl_warn, "warning: " << to_stream) |
emit a warning message with internal location info More... | |
#define | CL_ERROR(to_stream) CL_MSG_STREAM_INTERNAL(cl_error, "error: " << to_stream) |
emit an error message with internal location info More... | |
#define | CL_NOTE(to_stream) CL_MSG_STREAM_INTERNAL(cl_note, "note: " << to_stream) |
emit a note message with internal location info More... | |
#define | CL_DEBUG_MSG(loc, what) CL_MSG_STREAM(cl_debug, *(loc) << "debug: " << what) |
emit a debug message using the given location info More... | |
#define | CL_WARN_MSG(loc, what) CL_MSG_STREAM(cl_warn, *(loc) << "warning: " << what) |
emit a warning message using the given location info More... | |
#define | CL_ERROR_MSG(loc, what) CL_MSG_STREAM(cl_error, *(loc) << "error: " << what) |
emit an error message using the given location info More... | |
#define | CL_NOTE_MSG(loc, what) CL_MSG_STREAM(cl_note, *(loc) << "note: " << what) |
emit a note message using the given location info More... | |
#define | CL_DEBUG_AT(level, what) |
same as CL_DEBUG, but compares the current debug level with the given one More... | |
#define | CL_DEBUG_MSG_AT(level, loc, what) |
same as CL_DEBUG_MSG, but compares current debug level with the given one More... | |
Functions | |
std::ostream & | operator<< (std::ostream &str, const struct cl_loc &loc) |
void | cl_debug (const char *msg) |
emit raw debug message More... | |
void | cl_warn (const char *msg) |
emit raw warning message More... | |
void | cl_error (const char *msg) |
emit raw error message More... | |
void | cl_note (const char *msg) |
emit raw note message More... | |
void | cl_die (const char *msg) |
emit raw fatal error and ask cl peer to shoot down the process More... | |
int | cl_debug_level (void) |
current debugging level More... | |
Macros for emitting error, warning, info and debug messages through the code listener interface.
Definition in file cl_msg.hh.
#define CL_DEBUG | ( | to_stream) | CL_MSG_STREAM_INTERNAL(cl_debug, "debug: " << to_stream) |
#define CL_DEBUG_AT | ( | level, | |
what | |||
) |
#define CL_DEBUG_MSG | ( | loc, | |
what | |||
) | CL_MSG_STREAM(cl_debug, *(loc) << "debug: " << what) |
#define CL_DEBUG_MSG_AT | ( | level, | |
loc, | |||
what | |||
) |
same as CL_DEBUG_MSG, but compares current debug level with the given one
#define CL_DIE | ( | msg) |
#define CL_ERROR | ( | to_stream) | CL_MSG_STREAM_INTERNAL(cl_error, "error: " << to_stream) |
#define CL_ERROR_MSG | ( | loc, | |
what | |||
) | CL_MSG_STREAM(cl_error, *(loc) << "error: " << what) |
#define CL_MSG_STREAM | ( | fnc, | |
to_stream | |||
) |
standard output stream wrapper on top of the code listener interface
fnc | a function used to emit the message - cl_debug(), cl_warn(), cl_error() or cl_note() |
to_stream | whatever you need to stream out. Stuff with defined operator<<(std::ostream, ...) is a viable start. |
#define CL_MSG_STREAM_INTERNAL | ( | fnc, | |
to_stream | |||
) |
wrapper around CL_MSG_STREAM decorating the message by internal location info
see cl_msg.hh::CL_MSG_STREAM for details
#define CL_NOTE | ( | to_stream) | CL_MSG_STREAM_INTERNAL(cl_note, "note: " << to_stream) |
#define CL_NOTE_MSG | ( | loc, | |
what | |||
) | CL_MSG_STREAM(cl_note, *(loc) << "note: " << what) |
#define CL_WARN | ( | to_stream) | CL_MSG_STREAM_INTERNAL(cl_warn, "warning: " << to_stream) |
#define CL_WARN_MSG | ( | loc, | |
what | |||
) | CL_MSG_STREAM(cl_warn, *(loc) << "warning: " << what) |
void cl_debug | ( | const char * | msg) |
emit raw debug message
[in] | msg | The message to be emitted |
int cl_debug_level | ( | void | ) |
current debugging level
void cl_die | ( | const char * | msg) |
emit raw fatal error and ask cl peer to shoot down the process
[in] | msg | The message to be emitted |
void cl_error | ( | const char * | msg) |
emit raw error message
[in] | msg | The message to be emitted |
void cl_note | ( | const char * | msg) |
emit raw note message
[in] | msg | The message to be emitted |
void cl_warn | ( | const char * | msg) |
emit raw warning message
[in] | msg | The message to be emitted |
|
inline |
Definition at line 144 of file cl_msg.hh.
References cl_loc::column, cl_loc::file, and cl_loc::line.