mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 22:40:01 -04:00
refractor websocket again
This commit is contained in:
parent
c681e21777
commit
c9236f90d5
9 changed files with 233 additions and 208 deletions
18
client/javascript/logger.js
Normal file
18
client/javascript/logger.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
function logger(type, text) {
|
||||
if (type === "log")
|
||||
console.log(text);
|
||||
else if (type === "warn")
|
||||
console.warn(text);
|
||||
else if (type === "error")
|
||||
console.error(text);
|
||||
}
|
||||
|
||||
function log_msg(text) {
|
||||
logger("log", text);
|
||||
}
|
||||
function warn_msg(text) {
|
||||
logger("warn", text);
|
||||
}
|
||||
function error_msg(text) {
|
||||
logger("error", text);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue