Tracing module.
More...
#include <cstdarg>
#include <cstdint>
#include "util/compat.h"
#include "trace_types.h"
Go to the source code of this file.
|
| void | trace_ (unsigned int trace_type, const char *filename, int line_num, const char *function_name, char const *format,...) |
| |
| void | trace_set (unsigned int trace_type_mask) |
| | Specify the set of trace types that are currently enabled. More...
|
| |
| unsigned int | trace_get () |
| | Get the set of trace types that are currently enabled. More...
|
| |
Tracing module.
- Note
- See trace.cpp.
§ TRACE
Other modules in our program use this macro for reporting. We can use preprocessor macros like FILE and LINE to provide more information in the output messages. We can also remove all messages at compile time by changing the definition.
- Parameters
-
| type | The type of the message. This is really a bit vector of all times when this message should be printed. If the current debug setting contains any one of these bits, we print the message. |
| format | The format string for the printing. Format follows that of printf(3). |
| rest | Optional arguments that can printed (see printf(3) definition for more details). |
- Returns
- void
§ TRACE_GET
§ TRACE_SET
Macro wrapper for trace_set()
- Parameters
-
| types | Passed through as trace_type_mask parameter of trace_set(). |
- Returns
- void
§ trace_()
| void trace_ |
( |
unsigned int |
trace_type, |
|
|
const char * |
filename, |
|
|
int |
line_num, |
|
|
const char * |
function_name, |
|
|
char const * |
format, |
|
|
|
... |
|
) |
| |
§ trace_get()
| unsigned int trace_get |
( |
| ) |
|
Get the set of trace types that are currently enabled.
§ trace_set()
| void trace_set |
( |
unsigned int |
trace_type_mask | ) |
|
Specify the set of trace types that are currently enabled.
- Parameters
-
| trace_type_mask | Bitmask used to specify the current set of trace types. |