7 #include "imdatatypes.h"
9 input: name of file to log too
10 input: onoff, 0 means no logging
11 global: creates a global variable FILE* lg_file
14 int im_init_log(pIMCTX, const char *name, int onoff );
15 #define i_init_log(name, onoff) im_init_log(aIMCTX, name, onoff)
16 #ifndef IMAGER_NO_CONTEXT
17 void i_fatal ( int exitcode,const char *fmt, ... );
19 void im_fatal (pIMCTX, int exitcode,const char *fmt, ... );
20 void im_lhead ( pIMCTX, const char *file, int line );
21 void i_lhead ( const char *file, int line );
22 void i_loog(int level,const char *msg, ... ) I_FORMAT_ATTR(2,3);
23 void im_loog(pIMCTX, int level,const char *msg, ... ) I_FORMAT_ATTR(3,4);
26 =item mm_log((level, format, ...))
29 This is the main entry point to logging. Note that the extra set of
30 parentheses are required due to limitations in C89 macros.
32 This will format a string with the current file and line number to the
33 log file if logging is enabled.
39 #ifndef IMAGER_NO_CONTEXT
40 #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
42 #define im_log(x) { im_lhead(aIMCTX, __FILE__,__LINE__); im_loog x; }