diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
| commit | 6232d13f5321b87ddf12a1aa36b4545da45f173d (patch) | |
| tree | 23f3316470a14136debd9d02f9e920ca2b06f4cc /src/logger_base.hh | |
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in
memroy.
Diffstat (limited to 'src/logger_base.hh')
| -rw-r--r-- | src/logger_base.hh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/logger_base.hh b/src/logger_base.hh new file mode 100644 index 0000000..feed8ef --- /dev/null +++ b/src/logger_base.hh @@ -0,0 +1,25 @@ +#ifndef LOGGER_BASE_HH +#define LOGGER_BASE_HH + +#include "logger.hh" + +#include <string_view> + +class LoggerBase : public Logger { +public: + void err(char const* format, ...) override; + void warn(char const* format, ...) override; + void info(char const* format, ...) override; +#ifndef NDEBUG + void dbg(char const* format, ...) override; +#endif + +protected: + enum class Level { + ERR, WARN, INFO, DBG + }; + + virtual void msg(Level level, std::string_view str) = 0; +}; + +#endif // LOGGER_BASE_HH |
