Fission FSN
Loading...
Searching...
No Matches
fsLog.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsLog.h
4*
5* Purpose: Log debug output to a text file.
6*
7*********************************************************************/
8
9#ifndef fsLoghdr
10#define fsLoghdr
11
12#define ENABLE_LOGGING
13
14#if !defined ENABLE_LOGGING
15
16 #define fsLogMsg( ... )
17 #define fsLogError( ... )
18
19#else
20
21#if defined fsFRAMEWORK_CX
23#elif defined fsFRAMEWORK_AX
25#elif defined fsFRAMEWORK_MG
27#elif defined fsFRAMEWORK_RL
29#elif defined fsFRAMEWORK_BF
31#else
32 #error Unhandled platform.
33#endif
34
35#include "fsDebugHelpers.h"
36#include "fsIDebug.h"
37
38#define fsLogMsg( pFmtStr, ... ) \
39 { \
40 fsStr logStr( "FISSION_LOG(" ); logStr += __FUNCTION__; logStr += ") "; \
41 logStr += variableArguementListCompound(pFmtStr, ##__VA_ARGS__);\
42 fsCLogMsg(logStr); \
43 }
44
45#define fsLogError( pFmtStr, ... ) \
46 { \
47 fsStr logStr( "FISSION_ERROR(" ); logStr += __FUNCTION__; logStr += ") "; \
48 logStr += variableArguementListCompound(pFmtStr, ##__VA_ARGS__);\
49 fsCLogMsg("\n"); \
50 fsCLogError(logStr); \
51 fsCLogMsg("\n"); \
52 }
53
54#define fsLogFlushMsg( pFmtStr, ... ) \
55 { \
56 fsStr logStr( "FISSION_LOG(" ); logStr += __FUNCTION__; logStr += ") "; \
57 logStr += variableArguementListCompound(pFmtStr, ##__VA_ARGS__);\
58 fsCLogError(logStr); \
59 }
60
61#endif
62
63#endif