mirror of
https://github.com/fmang/opustags.git
synced 2025-07-13 12:35:43 +02:00
proposition of logger
This commit is contained in:
29
src/log.h
Normal file
29
src/log.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
namespace opustags {
|
||||
|
||||
enum class LogLevel {
|
||||
LOG_NORMAL = 0,
|
||||
LOG_VERBOSE = 1,
|
||||
LOG_DEBUG = 2,
|
||||
LOG_DEBUG_EXTRA = 3,
|
||||
};
|
||||
|
||||
class Log
|
||||
{
|
||||
public:
|
||||
Log(std::ostream &out);
|
||||
|
||||
LogLevel level;
|
||||
|
||||
Log& operator<<(LogLevel lvl);
|
||||
template<class T> Log& operator<<(const T&);
|
||||
|
||||
private:
|
||||
std::ostream &out;
|
||||
};
|
||||
|
||||
|
||||
extern Log log;
|
||||
|
||||
}
|
Reference in New Issue
Block a user