Вывод на консоль при использовании Websocketpp
Я отлаживаю некоторый иностранный код, который использует websocketpp. Я получаю довольно подробный вывод на консоль, хотя все работает нормально. Можно ли отключить вывод или он хотя бы указывает на что-то конкретное? BR, Даниэль
[2014-07-08 14:51:27] [fatal] error in handle_read_handshake: End of File
[2014-07-08 14:51:27] [fatal] error in handle_read_frame: End of File (websocketpp.transport:7)
[2014-07-08 14:51:27] [info] asio async_shutdown error: system:10054 (An existing connection was forcibly closed by the remote host)
[2014-07-08 14:51:27] [error] Underlying Transport Error
[2014-07-08 14:51:27] [fatal] error in handle_read_frame: End of File (websocketpp.transport:7)
[2014-07-08 14:51:27] [info] asio async_write error: system:10053 (An established connection was aborted by the software in your host machine)
[2014-07-08 14:51:27] [fatal] error in handle_write_frame: Underlying TransportError
[2014-07-08 14:51:35] [fatal] error in handle_read_frame: End of File (websocketpp.transport:7)
[2014-07-08 14:51:35] [info] asio async_shutdown error: system:10054 (An existing connection was forcibly closed by the remote host)
[2014-07-08 14:51:35] [error] Underlying Transport Error
2 ответа
websocketpp::server<websocketpp::config::asio> server;
server.clear_access_channels(websocketpp::log::alevel::frame_header | websocketpp::log::alevel::frame_payload);
// this will turn off console output for frame header and payload
server.clear_access_channels(websocketpp::log::alevel::all);
// this will turn off everything in console output
Более подробную информацию можно найти здесь: http://www.zaphoyd.com/websocketpp/manual/reference/logging
Вы должны указать действительный ip и порт работающего сервера socket.io
то есть. если ваш сокет-сервер работает на локальном сервере, вы должны дать
connect("http://localhost:8080")
это может быть полезно для других с такой же проблемой