Sturk 1.0.2
Publish-subscribe C implementation.
|
Trace. More...
#include "st/os/fstream.h"
Go to the source code of this file.
Macros | |
#define | ST_LOGGER_EN 0 |
Logger enabled. | |
#define | ST_TRACE(lvl, tag, ...) |
Log to the streams that are attached to the logger. | |
Enumerations | |
enum | StTraceLvl { ST_UNKNOWN = 0 , ST_DEBUG , ST_INFO , ST_WARNING , ST_ERROR , ST_N_TRACE_LVLS } |
Trace level. More... | |
Functions | |
void | st_trace (enum StTraceLvl lvl, const char *tag, const char *format,...) |
Log to the file streams that are attached to the logger. | |
void | st_logger_attach (enum StTraceLvl lvl, StFstream *stream) |
Attach a stream to the logger. | |
void | st_logger_detach (enum StTraceLvl lvl, StFstream *stream) |
Detach a stream from the logger. | |
void | st_logger_cleanup (void) |
Detach all streams and free all the memory allocated by the logger. | |
Trace.
#define ST_TRACE | ( | lvl, | |
tag, | |||
... | |||
) |
Log to the streams that are attached to the logger.
This is almost the same as st_trace(). The main difference is that it will not compile if the ST_LOGGER_EN is 0.
enum StTraceLvl |
void st_logger_attach | ( | enum StTraceLvl | lvl, |
StFstream * | stream | ||
) |
Attach a stream to the logger.
[in] | lvl | The trace level. |
[in,out] | stream | The stream. |
void st_logger_detach | ( | enum StTraceLvl | lvl, |
StFstream * | stream | ||
) |
Detach a stream from the logger.
[in] | lvl | The trace level. |
[in,out] | stream | The stream. |
void st_trace | ( | enum StTraceLvl | lvl, |
const char * | tag, | ||
const char * | format, | ||
... | |||
) |
Log to the file streams that are attached to the logger.
[in] | lvl | The trace level. |
[in] | tag | The tag string. |
[in] | format | The format string. |
[in] | ... | The list of arguments. |