diff options
author | Devaev Maxim <[email protected]> | 2018-11-05 06:20:05 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-11-05 06:20:05 +0300 |
commit | 43bbf725b872d8b2cd1ed29b4689f2f31ffecace (patch) | |
tree | 23b393bd2c6013001b25d87d388353f8dab5d7ed /web/js/session.js | |
parent | 9f2c0dd14ed57567eda7c2a539ba445dda79c3b2 (diff) |
js logs refactoring
Diffstat (limited to 'web/js/session.js')
-rw-r--r-- | web/js/session.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/js/session.js b/web/js/session.js index dcc968c7..97352448 100644 --- a/web/js/session.js +++ b/web/js/session.js @@ -52,7 +52,7 @@ function Session(atx, hid, msd) { var __wsOpenHandler = function(event) { $("link-led").className = "led-green"; $("link-led").title = "Connected"; - tools.debug("WebSocket opened:", event); + tools.debug("Session: socket opened:", event); atx.loadInitialState(); msd.loadInitialState(); hid.setSocket(__ws); @@ -61,7 +61,7 @@ function Session(atx, hid, msd) { }; var __wsMessageHandler = function(event) { - // tools.debug("WebSocket: received data:", event.data); + // tools.debug("Session: received socket data:", event.data); event = JSON.parse(event.data); if (event.msg_type === "pong") { __missed_heartbeats = 0; @@ -75,7 +75,7 @@ function Session(atx, hid, msd) { }; var __wsErrorHandler = function(event) { - tools.error("WebSocket error:", event); + tools.error("Session: socket error:", event); if (__ws) { __ws.onclose = null; __ws.close(); @@ -85,7 +85,7 @@ function Session(atx, hid, msd) { var __wsCloseHandler = function(event) { $("link-led").className = "led-gray"; - tools.debug("WebSocket closed:", event); + tools.debug("Session: socket closed:", event); if (__ping_timer) { clearInterval(__ping_timer); __ping_timer = null; @@ -107,7 +107,7 @@ function Session(atx, hid, msd) { } __ws.send(JSON.stringify({"event_type": "ping"})); } catch (err) { - tools.error("Ping error:", err.message); + tools.error("Session: ping error:", err.message); if (__ws) { __ws.onclose = null; __ws.close(); |