mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-30 09:26:15 +02:00
sampleFormat
git-svn-id: svn://elaine/murooma/trunk@205 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
d4fcf84fb8
commit
e7803a2c11
13 changed files with 176 additions and 157 deletions
|
@ -11,7 +11,10 @@ Log::Log(std::string ident, int facility) {
|
|||
|
||||
int Log::sync() {
|
||||
if (buffer_.length()) {
|
||||
syslog(priority_, buffer_.c_str());
|
||||
if (priority_ == dbg)
|
||||
std::cout << buffer_.c_str();
|
||||
else
|
||||
syslog(priority_, "%s", buffer_.c_str());
|
||||
buffer_.erase();
|
||||
priority_ = LOG_DEBUG; // default to debug for each message
|
||||
}
|
||||
|
@ -29,6 +32,8 @@ int Log::overflow(int c) {
|
|||
|
||||
std::ostream& operator<< (std::ostream& os, const LogPriority& log_priority) {
|
||||
static_cast<Log *>(os.rdbuf())->priority_ = (int)log_priority;
|
||||
if (log_priority == dbg)
|
||||
os.flush();
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue