]> git.imager.perl.org - imager.git/blob - log.h
allow freetype-config to be found on cygwin
[imager.git] / log.h
1 #ifndef _LOG_H_
2 #define _LOG_H_
3
4 #include <stdio.h>
5 #include <stdarg.h>
6 #include <time.h>
7 #include "imdatatypes.h"
8 /* 
9    input:  name of file to log too
10    input:  onoff, 0 means no logging
11    global: creates a global variable FILE* lg_file
12 */
13
14 int i_init_log( const char *name, int onoff );
15 void i_fatal ( int exitcode,const char *fmt, ... );
16 void i_lhead ( const char *file, int line  );
17 void i_loog(int level,const char *msg, ... ) I_FORMAT_ATTR(2,3);
18
19 /*
20 =item mm_log((level, format, ...))
21 =category Logging
22
23 This is the main entry point to logging. Note that the extra set of
24 parentheses are required due to limitations in C89 macros.
25
26 This will format a string with the current file and line number to the
27 log file if logging is enabled.
28
29 =cut
30 */
31
32 #ifdef IMAGER_LOG
33 #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; } 
34 #else
35 #define mm_log(x)
36 #endif
37
38
39 #endif /* _LOG_H_ */