Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / colonet / ColonetServer / includes / Logging.h @ 11

History | View | Annotate | Download (501 Bytes)

1 11 emarinel
/**
2
 *
3
 *  @author Jason Knichel
4
 *
5
 */
6
7
#ifndef LOGGING_H
8
#define LOGGING_H
9
10
#include <time.h>
11
#include <stdio.h>
12
13
#define LOG_TYPE_START_LOG  0
14
#define LOG_TYPE_CONNECT    1
15
#define LOG_TYPE_DISCONNECT 2
16
#define LOG_TYPE_ERROR      3
17
#define LOG_TYPE_MESSAGE    4
18
19
#define LOG_MAX_TYPE_LENGTH 25
20
#define LOG_MAX_TIME_LENGTH 64
21
22
class Log {
23
public:
24
  Log(char * fileName);
25
  ~Log();
26
27
  int logMessage(int type, char * message);
28
29
private:
30
  struct tm getCurrentTime();
31
32
  FILE * logFile;
33
34
};
35
36
37
#endif