Replace use of deprecated internal debugLog with logger.debug

This commit is contained in:
CosminPerRam 2023-09-18 10:48:24 +03:00
parent ca69e76ed3
commit bff9507189
12 changed files with 64 additions and 69 deletions

View file

@ -111,7 +111,7 @@ export default class battlefield extends Core {
return await this.tcpSend(socket, outPacket, (data) => {
const decoded = this.decodePacket(data);
if(decoded) {
this.debugLog(decoded);
this.logger.debug(decoded);
if(decoded.shift() !== 'OK') throw new Error('Missing OK');
return decoded;
}
@ -148,7 +148,7 @@ export default class battlefield extends Core {
const header = reader.uint(4);
const totalLength = reader.uint(4);
if(buffer.length < totalLength) return false;
this.debugLog("Expected " + totalLength + " bytes, have " + buffer.length);
this.logger.debug("Expected " + totalLength + " bytes, have " + buffer.length);
const paramCount = reader.uint(4);
const params = [];