1 //! Config file for Flog
4 //! @author Nabeel Sowan (nabeel.sowan@vibes.se)
6 //! Set these defines according to the needs of your project.
9 //! @def FLOG_CONFIG_EMPTY_STRING_TO_NULL
10 //! If defined, then strings passed to flog_print() and flog_printf()
11 //! will be checked for length and if they are empty (0 length)
12 //! then the string is set to null.
13 #define FLOG_CONFIG_EMPTY_STRING_TO_NULL
16 //! @def FLOG_CONFIG_ALLOW_NULL_MESSAGES
17 //! If defined, then messages with msg_id=0 and a NULL text string will
18 //! be passed on as valid flog messages.
19 #define FLOG_CONFIG_ALLOW_NULL_MESSAGES
22 //! @def FLOG_CONFIG_MSG_TYPE_ENUM_API
23 //! If defined, allows using an enum API for flog message types.
24 //! What this means is that FLOG_MSG_TYPE_T will be defined as an int
25 //! (instead of unsigned char) In return, enums may yield stronger
26 //! type checking and therefore easier debugging.
27 #define FLOG_CONFIG_MSG_TYPE_ENUM_API
30 //! @def FLOG_CONFIG_ABORT_ON_ASSERT
31 //! If defined then flog_assert() will call abort() on assertion failure.
32 //! This behaviour can be switched off for deeply embedded systems where
33 //! calling abort() doesn't make any sense.
34 #define FLOG_CONFIG_ABORT_ON_ASSERT
37 //! @def FLOG_CONFIG_TIMESTAMP
38 //! If defined, then this activates timestamping of flog messages,
39 //! using time.h. This requires working time routines in libc.
40 #define FLOG_CONFIG_TIMESTAMP
43 //! @def FLOG_CONFIG_TIMESTAMP_USEC
44 //! If defined, then this activates timestamping of flog messages with
45 //! millisecond (usec) accuracy. Requires sys/time.h support.
46 //#define FLOG_CONFIG_TIMESTAMP_USEC
49 //! @def FLOG_CONFIG_SRC_INFO
50 //! If defined, then each flog message will contain information about the
51 //! specific file, line and function name where flog_print(f) was called.
52 #define FLOG_CONFIG_SRC_INFO
55 //! @def FLOG_CONFIG_STRING_OUTPUT
56 //! If defined, then string output routines will be included in the
57 //! flog_string module. Omitting this will save a few k by avoiding
58 //! some code from stdio etc. Useful for cases where a deeply embedded
59 //! system should only transmit flog messages in binary form over a network.
60 #define FLOG_CONFIG_STRING_OUTPUT
63 //! @def FLOG_CONFIG_MSG_ID_STRINGS
64 //! If defined, then the FLOG_MSG_ID string data will be included.
65 //! This can be omitted for deeply embedded systems where string generation
66 //! isn't strictly necessary, and can be decoded by the receiver.
67 #define FLOG_CONFIG_MSG_ID_STRINGS
70 //! @def FLOG_CONFIG_ERRNO_STRINGS
71 //! If defined, then setting msg_id to a valid libc errno will fetch the
72 //! correct string from libc when outputing a string.
73 #define FLOG_CONFIG_ERRNO_STRINGS
76 //! @def FLOG_CONFIG_OUTPUT_SHOW_MSG_ID
77 //! If defined, then output of msg_id messages will print the msg_id
78 //! number (be it errno or a flog msg id)
79 #define FLOG_CONFIG_OUTPUT_SHOW_MSG_ID
82 //! @def FLOG_CONFIG_OUTPUT_STDIO
83 //! If defined, then flog will include the stdio output module (stdout and stderr)
84 #define FLOG_CONFIG_OUTPUT_STDIO
87 //! @def FLOG_CONFIG_OUTPUT_FILE
88 //! If defined, then flog will include the simple file output module.
89 #define FLOG_CONFIG_OUTPUT_FILE