mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 05:56:17 +02:00
new log class: "logState"
This commit is contained in:
parent
a4e501c960
commit
a759911474
5 changed files with 40 additions and 17 deletions
|
@ -111,9 +111,7 @@ void Controller::onMessageReceived(ClientConnection* connection, const msg::Base
|
|||
throw SnapException("codec not supported: \"" + headerChunk_->codec + "\"");
|
||||
|
||||
sampleFormat_ = decoder_->setHeader(headerChunk_.get());
|
||||
logO << "sample rate: " << sampleFormat_.rate << "Hz\n";
|
||||
logO << "bits/sample: " << sampleFormat_.bits << "\n";
|
||||
logO << "channels : " << sampleFormat_.channels << "\n";
|
||||
logState << "sampleformat: " << sampleFormat_.rate << ":" << sampleFormat_.bits << ":" << sampleFormat_.channels << "\n";
|
||||
|
||||
stream_.reset(new Stream(sampleFormat_));
|
||||
stream_->setBufferLen(serverSettings_->bufferMs - latency_);
|
||||
|
|
|
@ -1,11 +1,25 @@
|
|||
snapclient (0.5.0-beta-1) unstable; urgency=low
|
||||
snapclient (0.5.0~beta-1) unstable; urgency=low
|
||||
|
||||
* Features
|
||||
-TODO
|
||||
-Remote control API (JSON)
|
||||
Get server status, get streams, get active clients
|
||||
assign volume, assign stream, rename client, ...
|
||||
-Android port of the Snapclient with a remote control app
|
||||
-Multiple streams ("zones") can be configured using "-s, --stream":
|
||||
The stream is configured by an URI: path, name, codec, sample format, ...
|
||||
E.g. "pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac"
|
||||
or "file:///home/user/some_pcm_file.wav?name=file"
|
||||
-Added .default file for the service (/etc/default/snapserver).
|
||||
Default program options should be configured here (e.g. streams)
|
||||
* Bugfixes
|
||||
-TODO
|
||||
-pipe reader recovers if the pipe has been reopened
|
||||
* General
|
||||
-TODO
|
||||
-SnapCast is renamed to Snapcast
|
||||
SnapClient => Snapclient
|
||||
SnapServer => Snapserver
|
||||
-Snapcast protocol:
|
||||
Less messaging: SampleFormat, Command, Ack, String, not yet final
|
||||
-Removed dependency to boost
|
||||
|
||||
-- Johannes Pohl <johannes.pohl@badaix.de> Tue, 29 Dec 2015 12:00:00 +0200
|
||||
|
||||
|
|
|
@ -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("");
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#define logD std::clog << kDbg
|
||||
#define logO std::clog << kOut
|
||||
#define logE std::clog << kErr
|
||||
#define logState std::clog << kState
|
||||
#define logS(P) std::clog << P
|
||||
#define log logO
|
||||
|
||||
|
@ -41,7 +42,7 @@ enum LogPriority
|
|||
kLogNotice = LOG_NOTICE, // normal, but significant, condition
|
||||
kLogInfo = LOG_INFO, // informational message
|
||||
kLogDebug = LOG_DEBUG, // debug-level message
|
||||
kDbg, kOut, kErr
|
||||
kDbg, kOut, kState, kErr
|
||||
};
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const LogPriority& log_priority);
|
||||
|
|
|
@ -1,16 +1,24 @@
|
|||
snapserver (0.5.0-beta-1) unstable; urgency=low
|
||||
snapserver (0.5.0~beta-1) unstable; urgency=low
|
||||
|
||||
* Features
|
||||
-Added .default file
|
||||
-Remote control API (JSON)
|
||||
-Android Snapclient with remote control
|
||||
-PCM reader is configured by URI: path, name, codec, sample format, ...
|
||||
Get server status, get streams, get active clients
|
||||
assign volume, assign stream, rename client, ...
|
||||
-Android port of the Snapclient with a remote control app
|
||||
-Multiple streams ("zones") can be configured using "-s, --stream":
|
||||
The stream is configured by an URI: path, name, codec, sample format, ...
|
||||
E.g. "pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac"
|
||||
or "file:///home/user/some_pcm_file.wav?name=file"
|
||||
-Added .default file for the service (/etc/default/snapserver).
|
||||
Default program options should be configured here (e.g. streams)
|
||||
* Bugfixes
|
||||
-TODO
|
||||
-pipe reader recovers if the pipe has been reopened
|
||||
* General
|
||||
-SnapCast is renamed to Snapcast, SnapClient => Snapclient, SnapServer => Snapserver
|
||||
-SnapCast is renamed to Snapcast
|
||||
SnapClient => Snapclient
|
||||
SnapServer => Snapserver
|
||||
-Snapcast protocol:
|
||||
Less messaging: SampleFormat, Command, Ack, String
|
||||
Less messaging: SampleFormat, Command, Ack, String, not yet final
|
||||
-Removed dependency to boost
|
||||
|
||||
-- Johannes Pohl <johannes.pohl@badaix.de> Tue, 29 Dec 2015 12:00:00 +0200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue