-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlogger.h
More file actions
48 lines (36 loc) · 793 Bytes
/
logger.h
File metadata and controls
48 lines (36 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __LINE_LOGGER_H_
#define __LINE_LOGGER_H_
#include <stdio.h>
#include <string>
enum LoggerLevel
{
LOG_DEBUG,
LOG_INFO,
LOG_WARN,
LOG_ERROR,
};
class LoggerWriter
{
private:
std::string m_logDir;
FILE* m_log;
void setLogDir(std::string logDir);
public:
LoggerWriter();
virtual ~LoggerWriter();
void write(LoggerLevel level, const char* system, const char* __format, va_list ap);
static void init(std::string logDir);
};
class Logger
{
private:
const char* m_system;
public:
Logger(const char* system);
virtual ~Logger();
void log(const char* __format, ...); // INFO
void logv(const char* __format, va_list ap);
void warn(const char* __format, ...);
void error(const char* __format, ...);
};
#endif