mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-23 19:38:31 +02:00
new log class: "logState"
This commit is contained in:
parent
a4e501c960
commit
a759911474
5 changed files with 40 additions and 17 deletions
|
@ -54,11 +54,13 @@ int Log::sync()
|
|||
#endif
|
||||
else if (priority_ == kOut)
|
||||
std::cout << Timestamp() << " [out] " << buffer_.str() << std::flush;
|
||||
else if (priority_ == kState)
|
||||
std::cout << Timestamp() << " [state] " << buffer_.str() << std::flush;
|
||||
else if (priority_ == kErr)
|
||||
std::cout << Timestamp() << " [err] " << buffer_.str() << std::flush;
|
||||
else
|
||||
{
|
||||
std::cout << Timestamp() << " [" << priority_ << "] " << buffer_.str() << std::flush;
|
||||
std::cout << Timestamp() << " [" << (int)priority_ << "] " << buffer_.str() << std::flush;
|
||||
syslog(priority_, "%s", buffer_.str().c_str());
|
||||
}
|
||||
buffer_.str("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue