new macro FIXNULL.
[swftools.git] / lib / log.h
1 /* log.h 
2    Header file for log.c.
3
4    Part of the swftools package.
5    
6    Copyright (c) 2001 Matthias Kramm <kramm@quiss.org> 
7
8    This file is distributed under the GPL, see file COPYING for details */
9
10 #ifndef __log_h__
11 #define __log_h__
12
13 #ifdef __NT__
14 #include "stdafx.h"
15 #include <time.h>
16 #include <windef.h>
17 #else
18 #include <stdlib.h>
19 #include <stdio.h>
20 #include <time.h>
21 #endif
22
23 #define LOGLEVEL_FATAL 0
24 #define LOGLEVEL_ERROR 1
25 #define LOGLEVEL_WARNING 2
26 #define LOGLEVEL_NOTICE 3
27 #define LOGLEVEL_VERBOSE 4
28 #define LOGLEVEL_DEBUG 5
29
30 extern void initLog(char* pLogDir, int fileloglevel, char* servAddr, char* logPort, int serverloglevel, int screenloglevel);
31 extern void logf(const char* logFormat, ...);
32 extern void exitLog(void);
33
34 #define FIXNULL(a) ((int)(a)?(a):"NULL")
35
36 #endif  // __log_h__