interface_2logger_8c.tex
2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
\hypertarget{interface_2logger_8c}{
\section{src/interface/logger.c File Reference}
\label{interface_2logger_8c}\index{src/interface/logger.c@{src/interface/logger.c}}
}
{\ttfamily \#include $<$stdlib.h$>$}\par
{\ttfamily \#include $<$stdio.h$>$}\par
{\ttfamily \#include $<$stdarg.h$>$}\par
{\ttfamily \#include \char`\"{}logger.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}interface/logger.h\char`\"{}}\par
Include dependency graph for logger.c:
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item
void \hyperlink{interface_2logger_8c_a9053743a944f1faef3866efaa52d3c7f}{loggerLog} (void $\ast$\_\-object, \hyperlink{logger_8h_a63296c69f4b9bf51d6756a5d2c482d1e}{logger\_\-level} level, const char $\ast$const fmt,...)
\end{DoxyCompactItemize}
\subsection{Function Documentation}
\hypertarget{interface_2logger_8c_a9053743a944f1faef3866efaa52d3c7f}{
\index{interface/logger.c@{interface/logger.c}!loggerLog@{loggerLog}}
\index{loggerLog@{loggerLog}!interface/logger.c@{interface/logger.c}}
\subsubsection[{loggerLog}]{\setlength{\rightskip}{0pt plus 5cm}void loggerLog (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{\_\-object, }
\item[{{\bf logger\_\-level}}]{level, }
\item[{const char $\ast$const}]{fmt, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}
\label{interface_2logger_8c_a9053743a944f1faef3866efaa52d3c7f}
Definition at line 14 of file logger.c.
\begin{DoxyCode}
{
Logger object = _object;
if (level >= object->min_level) {
char * msg = NULL;
size_t msg_size = 0;
va_list params;
va_start(params, fmt);
msg_size = vsnprintf(msg, msg_size, fmt, params);
va_end(params);
msg = malloc(msg_size + 1);
va_start(params, fmt);
vsnprintf(msg, msg_size + 1, fmt, params);
va_end(params);
CALL(_object, Logger, log, level, msg);
free(msg);
}
}
\end{DoxyCode}
Here is the caller graph for this function: