debug
This commit is contained in:
parent
a83abf598d
commit
c72b2c494e
|
@ -46,6 +46,7 @@ export class Server {
|
|||
} else {
|
||||
socket.data.dataBuffer = data;
|
||||
}
|
||||
log.debug("Socket", socket.remoteAddress, "has", socket.data.dataBuffer.length, "data for parsing.");
|
||||
|
||||
const parseBuffer = () => {
|
||||
if(!socket.data.dataBuffer) return;
|
||||
|
|
8
deps.ts
8
deps.ts
|
@ -9,6 +9,11 @@ export const log = {
|
|||
},
|
||||
critical: (...a) => {
|
||||
console.error("[ERROR]", ...a);
|
||||
},
|
||||
debug: (...a) => {
|
||||
if(config.debug) {
|
||||
console.log("[DEBUG]", ...a)
|
||||
}
|
||||
}
|
||||
}
|
||||
export const config = {
|
||||
|
@ -19,5 +24,6 @@ export const config = {
|
|||
main: process.env.MAIN || "main",
|
||||
maxUsers: +(process.env.USERS || 24) > 255 ? 255 : +(process.env.USERS || 24),
|
||||
software: process.env.SOFTWARE || "Custom Cla66ic",
|
||||
name: process.env.NAME || "Cla66ic Server"
|
||||
name: process.env.NAME || "Cla66ic Server",
|
||||
debug: process.env.DEBUG == "true",
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue