mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-06 21:01:42 +02:00
log shairport messages
This commit is contained in:
parent
f897fd7076
commit
60ed5b46d4
1 changed files with 3 additions and 1 deletions
|
@ -69,9 +69,11 @@ void AirplayStream::initExeAndPath(const std::string& filename)
|
||||||
void AirplayStream::onStderrMsg(const char* buffer, size_t n)
|
void AirplayStream::onStderrMsg(const char* buffer, size_t n)
|
||||||
{
|
{
|
||||||
string logmsg = trim_copy(string(buffer, n));
|
string logmsg = trim_copy(string(buffer, n));
|
||||||
|
if (logmsg.empty())
|
||||||
|
return;
|
||||||
|
logO << "(" << exe_ << ") " << logmsg << "\n";
|
||||||
if (logmsg.find("Is another Shairport Sync running on this device") != string::npos)
|
if (logmsg.find("Is another Shairport Sync running on this device") != string::npos)
|
||||||
{
|
{
|
||||||
logO << logmsg << "\n";
|
|
||||||
logE << "Seem there is another Shairport Sync runnig on port " << port_ << ", switching to port " << port_ + 1 << "\n";
|
logE << "Seem there is another Shairport Sync runnig on port " << port_ << ", switching to port " << port_ + 1 << "\n";
|
||||||
++port_;
|
++port_;
|
||||||
params_ = params_wo_port_ + " --port=" + cpt::to_string(port_);
|
params_ = params_wo_port_ + " --port=" + cpt::to_string(port_);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue