38#ifndef ST_LOGGER_TRACE_H
39#define ST_LOGGER_TRACE_H
64#define ST_TRACE(lvl, tag, ...) \
67 st_trace(lvl, tag, __VA_ARGS__); \
struct StFstream StFstream
File stream.
Definition fstream.h:51
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.
StTraceLvl
Trace level.
Definition trace.h:75
@ ST_N_TRACE_LVLS
number of trace levels.
Definition trace.h:81
@ ST_DEBUG
debug trace level.
Definition trace.h:77
@ ST_INFO
info trace level.
Definition trace.h:78
@ ST_UNKNOWN
unknown trace level.
Definition trace.h:76
@ ST_WARNING
warning trace level.
Definition trace.h:79
@ ST_ERROR
error trace level.
Definition trace.h:80
void st_logger_cleanup(void)
Detach all streams and free all the memory allocated by the logger.
void st_trace(enum StTraceLvl lvl, const char *tag, const char *format,...)
Log to the file streams that are attached to the logger.