Add sanity checks to output plugins / Add config option FLOG_CONFIG_MSG_ID_STRINGS_EX...
[flog.git] / flog_output_file.h
blobd462ee0e8eb35a8f6bfe4f9386f6dd76353055c6
1 //! file output for Flog
3 //! @file flog_output_file.h
4 //! @author Nabeel Sowan (nabeel.sowan@vibes.se)
5 //!
6 //! When you want flog to write to a file
7 //! Choose logfile name by setting data to string
10 #ifndef FLOG_OUTPUT_FILE_H
11 #define FLOG_OUTPUT_FILE_H
13 #include "flog.h"
15 #ifdef FLOG_CONFIG_OUTPUT_FILE
17 // Sanity checks
18 #ifndef FLOG_CONFIG_STRING_OUTPUT
19 #error FLOG_CONFIG_OUTPUT_FILE requires FLOG_CONFIG_STRING_OUTPUT
20 #endif
21 #ifndef FLOG_CONFIG_MSG_ID_STRINGS
22 #error FLOG_CONFIG_OUTPUT_FILE requires FLOG_CONFIG_MSG_ID_STRINGS
23 #endif
24 #ifndef FLOG_CONFIG_ERRNO_STRINGS
25 #error FLOG_CONFIG_OUTPUT_FILE requires FLOG_CONFIG_ERRNO_STRINGS
26 #endif
28 int flog_output_file(FLOG_T *log,const FLOG_MSG_T *msg);
29 FLOG_T * create_flog_output_file(const char *name, FLOG_MSG_TYPE_T accepted_msg_type, const char *filename);
30 void destroy_flog_output_file(FLOG_T *p);
32 #endif //FLOG_CONFIG_OUTPUT_FILE
34 #endif //FLOG_OUTPUT_FILE_H