update logger

This commit is contained in:
badaix 2017-07-24 18:59:49 +02:00
parent 2955b20e9d
commit ce55f15c02
36 changed files with 967 additions and 389 deletions

View file

@ -36,7 +36,7 @@ FileStream::FileStream(PcmListener* pcmListener, const StreamUri& uri) : PcmStre
ifs.open(uri_.path.c_str(), std::ifstream::in|std::ifstream::binary);
if (!ifs.good())
{
logE << "failed to open PCM file: \"" + uri_.path + "\"\n";
LOG(ERROR) << "failed to open PCM file: \"" + uri_.path + "\"\n";
throw SnapException("failed to open PCM file: \"" + uri_.path + "\"");
}
}
@ -91,7 +91,7 @@ void FileStream::worker()
if (nextTick >= currentTick)
{
// logO << "sleep: " << nextTick - currentTick << "\n";
// LOG(INFO) << "sleep: " << nextTick - currentTick << "\n";
if (!sleep(nextTick - currentTick))
break;
}
@ -106,7 +106,7 @@ void FileStream::worker()
}
catch(const std::exception& e)
{
logE << "(FileStream) Exception: " << e.what() << std::endl;
LOG(ERROR) << "(FileStream) Exception: " << e.what() << std::endl;
}
}
}