X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=log.h;fp=log.h;h=7e51fcbe134fc8cd684d93702fe1a4e256529c30;hp=0000000000000000000000000000000000000000;hb=d1ad2cf60ca694f742e2061a596bc27c7e58f5c8;hpb=03569c70282f68a4bc9b259fbf5b7a2b4c5594b3 diff --git a/log.h b/log.h new file mode 100644 index 0000000..7e51fcb --- /dev/null +++ b/log.h @@ -0,0 +1,24 @@ +#ifndef _LOG_H +#define _LOG_H 1 + +// Functions for common logging to file and syslog. + +#include + +enum LogLevel { + NO_LEVEL, + 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, ...); + +#endif // !defined(_LOG_H)