ably / ably-java

Java, Android, Clojure and Scala client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
86 stars 40 forks source link

More verbose failure messages #169

Open mattheworiordan opened 7 years ago

mattheworiordan commented 7 years ago

See log below for connection failures, we should try and include the reason.

I/System.out: (INFO): TokenAuth.authorise(): requesting new token 
09-29 19:02:34.179 16436-16517/com.rundosrun.groupchat I/System.out: (INFO): Auth.requestToken(): using token auth with client-side signing 
09-29 19:02:34.199 16436-16517/com.rundosrun.groupchat I/System.out: (INFO): Auth.getTokenRequest(): generated signed request 
09-29 19:02:34.261 16436-16517/com.rundosrun.groupchat D/NetworkSecurityConfig: No Network Security Config specified, using platform default 
09-29 19:02:42.374 16436-16517/com.rundosrun.groupchat I/System.out: (DEBUG): io.ably.lib.http.Http: Connection failed to host `rest.ably.io`. Searching for new host... 
09-29 19:02:42.375 16436-16517/com.rundosrun.groupchat I/System.out: (DEBUG): io.ably.lib.http.Http: Switched to `A.ably-realtime.com`. Also, more importantly, when we enable verbose logging we should include a log of all protocol messages so that we can debug issues that customers have by getting the complete log sent to us.

┆Issue is synchronized with this Jira Task by Unito

trenouf commented 7 years ago

I've got a local fix for logging all protocol messages. I'll push it with any fix needed for #170.

mattheworiordan commented 7 years ago

Great, thanks