Page MenuHomePhabricator

rcstream doesnt log important status changes within a socketio connection
Closed, DeclinedPublic

Description

In the event of a problem in socketio_client, the log messages are discarded, with the logging layer emitting one notice to indicate that this has happened:

No handlers could be found for logger "socketIO_client"

When a logger was added for T85717 , we see that the problem was a critical disconnection, with an informative message:

WARNING:socketIO_client:[connection error] connection closed ()

I'm not sure that adding a socketIO_client" logger is the right thing to do. Ideally, pywikibot is catching exceptions and these messages are logged using the "pywiki-rcstream" logger. But we need logging soon, if we're to diagnose problems that occur.

As pywikibot is not currently catching this exception (which I believe is coming from websocket), we need to investigate that. Communication of important connection status changes might be happening via other mechanisms, like the generic handlers or by callbacks.

Event Timeline

jayvdb assigned this task to valhallasw.
jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb subscribed.

Yeah, it's being handled within SocketIO, just not the way we'd like it to be (no Exceptions are thrown!). We probably just want to re-log those messages as pywikibot.rcstream messages.

It would be nice if there was a way to reroute the socketio messages
into the pywikibot.rcstream , even if it meant using an external
package on the test builds which did the rerouting. That would at
least help us diagnose problems, so we can report them upstream.

https://gerrit.wikimedia.org/r/#/c/184414/ should give a temporary logging solution so we can see what's going on.

valhallasw set Security to None.
Xqt triaged this task as Lowest priority.Apr 23 2017, 8:42 AM
Xqt subscribed.

rcstream will be replaced by EventStreams soon

rcstream is deprecated and will be switchend off soon.