mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-04 00:59:32 +02:00
makefile
git-svn-id: svn://elaine/murooma/trunk@323 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
deca098bb4
commit
b857de9f45
12 changed files with 69 additions and 449 deletions
12
common/log.h
12
common/log.h
|
@ -5,7 +5,11 @@
|
|||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#define logd std::clog << dbg
|
||||
#define logD std::clog << kLog
|
||||
#define logO std::clog << kOut
|
||||
#define logE std::clog << kErr
|
||||
#define logS(P) std::clog << P
|
||||
#define log logO
|
||||
|
||||
enum LogPriority
|
||||
{
|
||||
|
@ -16,8 +20,8 @@ enum LogPriority
|
|||
kLogWarning = LOG_WARNING, // warning conditions
|
||||
kLogNotice = LOG_NOTICE, // normal, but significant, condition
|
||||
kLogInfo = LOG_INFO, // informational message
|
||||
kLogDebug = LOG_DEBUG, // debug-level message
|
||||
dbg
|
||||
kLogDebug = LOG_DEBUG, // debug-level message
|
||||
kLog, kOut, kErr
|
||||
};
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const LogPriority& log_priority);
|
||||
|
@ -33,6 +37,8 @@ protected:
|
|||
|
||||
private:
|
||||
friend std::ostream& operator<< (std::ostream& os, const LogPriority& log_priority);
|
||||
std::string Timestamp();
|
||||
std::string LogPriorityToString(const LogPriority& priority);
|
||||
std::string buffer_;
|
||||
int facility_;
|
||||
int priority_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue