Let's disable web socket logging by default (unless enabled in prefs)

This commit is contained in:
casey langen 2017-02-14 23:18:51 -08:00
parent d25d07893c
commit 6c96998ace

View File

@ -807,10 +807,16 @@ class PlaybackRemote : public IPlaybackRemote {
void ThreadProc() {
try {
wss.get_alog().set_ostream(&std::cerr);
wss.get_elog().set_ostream(&std::cerr);
wss.set_access_channels(websocketpp::log::alevel::all);
wss.clear_access_channels(websocketpp::log::alevel::frame_payload);
if (preferences->GetBool("debug")) {
wss.get_alog().set_ostream(&std::cerr);
wss.get_elog().set_ostream(&std::cerr);
wss.set_access_channels(websocketpp::log::alevel::all);
wss.clear_access_channels(websocketpp::log::alevel::frame_payload);
}
else {
wss.set_access_channels(websocketpp::log::alevel::none);
wss.clear_access_channels(websocketpp::log::alevel::none);
}
wss.init_asio();
wss.set_message_handler(std::bind(&PlaybackRemote::OnMessage, this, &wss, ::_1, ::_2));