File: log.h

package info (click to toggle)
cubemap 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 428 kB
  • sloc: cpp: 4,431; sh: 114; perl: 102; makefile: 60
file content (24 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef _LOG_H
#define _LOG_H 1

// Functions for common logging to file and syslog.

#include <string>

enum LogLevel {
	INFO,
	WARNING,
	ERROR,
};

void add_log_destination_file(const std::string &filename);
void add_log_destination_console();
void add_log_destination_syslog();

void start_logging();
void shut_down_logging();

void log(LogLevel log_level, const char *fmt, ...);
void log_perror(const char *msg);

#endif  // !defined(_LOG_H)