Skip to content
Snippets Groups Projects
Commit ef44443a authored by Jonah Husson's avatar Jonah Husson
Browse files

Convert prints to trace logs

parent 8fe24560
No related branches found
No related tags found
3 merge requests!39Merge release into master,!36Add separate isonline func for webconn,!32Project/channels
...@@ -202,12 +202,11 @@ func (wc *webConn) IsOnline() (time.Duration, bool) { ...@@ -202,12 +202,11 @@ func (wc *webConn) IsOnline() (time.Duration, bool) {
// IMPORTANT - enables better HTTP(S) discovery, because many browsers block CORS by default. // IMPORTANT - enables better HTTP(S) discovery, because many browsers block CORS by default.
req.Header.Add("js.fetch:mode", "no-cors") req.Header.Add("js.fetch:mode", "no-cors")
fmt.Println("(GO request): ", fmt.Sprintf("%+v", req)) jww.TRACE.Println("(GO request): ", fmt.Sprintf("%+v", req))
req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace)) req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
if _, err := client.Do(req); err != nil { if _, err := client.Do(req); err != nil {
fmt.Println(err) jww.TRACE.Println("(GO error): ", err.Error())
fmt.Println("(GO error): ", err.Error())
// TODO: Get more exception strings for major browsers // TODO: Get more exception strings for major browsers
errString := strings.ToLower(err.Error()) errString := strings.ToLower(err.Error())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment