]> git.sesse.net Git - cubemap/blob - log.h
Merge branch 'master' of /srv/git.sesse.net/www/cubemap
[cubemap] / log.h
1 #ifndef _LOG_H
2 #define _LOG_H 1
3
4 // Functions for common logging to file and syslog.
5
6 #include <string>
7
8 enum LogLevel {
9         NO_LEVEL,
10         INFO,
11         WARNING,
12         ERROR,
13 };
14
15 void add_log_destination_file(const std::string &filename);
16 void add_log_destination_console();
17 void add_log_destination_syslog();
18
19 void start_logging();
20 void shut_down_logging();
21
22 void log(LogLevel log_level, const char *fmt, ...);
23 void log_perror(const char *msg);
24
25 #endif  // !defined(_LOG_H)