| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- \hypertarget{log_8h_source}{}\doxysection{log.\+h}
- \label{log_8h_source}\index{include/toolbox/log.h@{include/toolbox/log.h}}
- \begin{DoxyCode}{0}
- \DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef TOOLBOX\_LOG\_H}}
- \DoxyCodeLine{2 \textcolor{preprocessor}{\#define TOOLBOX\_LOG\_H}}
- \DoxyCodeLine{3 }
- \DoxyCodeLine{4 \textcolor{preprocessor}{\#include "{}toolbox/ansi\_escape.h"{}}}
- \DoxyCodeLine{5 }
- \DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdio.h>}}
- \DoxyCodeLine{7 }
- \DoxyCodeLine{8 \textcolor{preprocessor}{\#ifndef LOG\_FILE\_OUT}}
- \DoxyCodeLine{9 \textcolor{preprocessor}{\#define LOG\_FILE\_OUT stdout}}
- \DoxyCodeLine{10 \textcolor{preprocessor}{\#endif}}
- \DoxyCodeLine{11 }
- \DoxyCodeLine{12 \textcolor{preprocessor}{\#define LOGV\_TEST(MSG, ...) \(\backslash\)}}
- \DoxyCodeLine{13 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT \(\backslash\)}}
- \DoxyCodeLine{14 \textcolor{preprocessor}{ , FG\_MAGENTA"{}"{}}SET\_BLINK"{}[TEST] (\%s:\%d) "{}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{15 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_, \_\_VA\_ARGS\_\_)}
- \DoxyCodeLine{16 \textcolor{preprocessor}{\#define LOGV\_INFO(MSG, ...) \(\backslash\)}}
- \DoxyCodeLine{17 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, "{}[INFO] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{18 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_, \_\_VA\_ARGS\_\_)}
- \DoxyCodeLine{19 \textcolor{preprocessor}{\#define LOGV\_WARNING(MSG, ...) \(\backslash\)}}
- \DoxyCodeLine{20 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, FG\_YELLOW"{}[WARNING] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{21 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_, \_\_VA\_ARGS\_\_)}
- \DoxyCodeLine{22 \textcolor{preprocessor}{\#define LOGV\_ERROR(MSG, ...) \(\backslash\)}}
- \DoxyCodeLine{23 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, FG\_RED"{}[ERROR] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{24 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_, \_\_VA\_ARGS\_\_)}
- \DoxyCodeLine{25 }
- \DoxyCodeLine{26 \textcolor{preprocessor}{\#define LOG\_TEST(MSG) \(\backslash\)}}
- \DoxyCodeLine{27 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT \(\backslash\)}}
- \DoxyCodeLine{28 \textcolor{preprocessor}{ , FG\_MAGENTA"{}"{}}SET\_BLINK"{}[TEST] (\%s:\%d) "{}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{29 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_)}
- \DoxyCodeLine{30 \textcolor{preprocessor}{\#define LOG\_INFO(MSG) \(\backslash\)}}
- \DoxyCodeLine{31 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, "{}[INFO] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{32 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_)}
- \DoxyCodeLine{33 \textcolor{preprocessor}{\#define LOG\_WARNING(MSG) \(\backslash\)}}
- \DoxyCodeLine{34 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, FG\_YELLOW"{}[WARNING] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{35 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_)}
- \DoxyCodeLine{36 \textcolor{preprocessor}{\#define LOG\_ERROR(MSG) \(\backslash\)}}
- \DoxyCodeLine{37 \textcolor{preprocessor}{ fprintf(LOG\_FILE\_OUT, FG\_RED"{}[ERROR] (\%s:\%d) "{}}MSG"{}"{}RST\_ALL"{}\(\backslash\)n"{} \(\backslash\)}
- \DoxyCodeLine{38 , \_\_FILE\_NAME\_\_, \_\_LINE\_\_)}
- \DoxyCodeLine{39 }
- \DoxyCodeLine{40 \textcolor{preprocessor}{\#endif}}
- \end{DoxyCode}
|