changed logf to msg.
[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 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #ifdef __NT__
17 #include "stdafx.h"
18 #include <time.h>
19 #include <windef.h>
20 #else
21 #include <stdlib.h>
22 #include <stdio.h>
23 #include <time.h>
24 #endif
25
26 #define LOGLEVEL_FATAL 0
27 #define LOGLEVEL_ERROR 1
28 #define LOGLEVEL_WARNING 2
29 #define LOGLEVEL_NOTICE 3
30 #define LOGLEVEL_VERBOSE 4
31 #define LOGLEVEL_DEBUG 5
32
33 extern int screenloglevel;
34
35 extern void initLog(char* pLogDir, int fileloglevel, char* servAddr, char* logPort, int serverloglevel, int screenloglevel);
36 extern void msg(const char* logFormat, ...);
37 extern void exitLog(void);
38
39 #define FIXNULL(a) ((int)(a)?(a):"NULL")
40
41 #ifdef __cplusplus
42 }
43 #endif
44 #endif  // __log_h__