Merge branch 'master' of github:szmoore/MCTX3420
[matches/MCTX3420.git] / server / log.h
1 /**
2  * @file log.h
3  * @purpose Declaration of functions for printing log messages and/or terminating program after a fatal error
4  */
5
6 #ifndef _LOG_H
7 #define _LOG_H
8
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <stdbool.h>
12 #include <stdarg.h>
13
14
15 // An enum to make the severity of log messages human readable in code
16 enum {LOGERR=0, LOGWARN=1, LOGNOTE=2, LOGINFO=3,LOGDEBUG=4};
17
18 extern void Log(int level, char * funct, char * fmt,...); // General function for printing log messages to stderr
19 extern void Fatal(char * funct, char * fmt, ...); // Function that deals with a fatal error (prints a message, then exits the program).
20
21 #endif //_LOG_H
22
23 //EOF

UCC git Repository :: git.ucc.asn.au