// -*- mode: c++; c-basic-offset: 2; -*- #ifndef LOGGER_HH #define LOGGER_HH #include class Logger { public: virtual ~Logger() {} enum Level { ERR, WARN, INFO }; static Logger* create_stderr(); static Logger* create_syslog(std::string const& name); static Logger* create_file(std::string const& path); virtual void out(Level lvl, char const* format, ...) #ifdef HAVE_FUNC_ATTRIBUTE_FORMAT __attribute__ ((format (printf, 3, 4))) #endif = 0; protected: Logger() {} Logger(Logger const&) = delete; }; #endif // LOGGER_HH