Skip to content

Commit

Permalink
fix: Move some ZiGate log statement to debug (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed May 4, 2024
1 parent f1890ad commit 44235eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapter/zigate/driver/frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class ZiGateFrame {

try {
if(this.readMsgCode() !== 0x8001)
logger.info(`${JSON.stringify(this)}`, NS);
logger.debug(`${JSON.stringify(this)}`, NS);
} catch (e) {
logger.error(e, NS);
}
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zigate/driver/ziGateObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class ZiGateObject {

if (buffalo.isMore()) {
let bufferString = buffalo.getBuffer().toString('hex');
logger.error(`Last bytes of data were not parsed \x1b[32m${bufferString.slice(0, (buffalo.getPosition() * 2)).replace(/../g, "$& ")}`
logger.debug(`Last bytes of data were not parsed \x1b[32m${bufferString.slice(0, (buffalo.getPosition() * 2)).replace(/../g, "$& ")}`
+ `\x1b[31m${bufferString.slice(buffalo.getPosition() * 2).replace(/../g, "$& ")}\x1b[0m `, NS);
}

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/zigate/driver/zigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export default class ZiGate extends EventEmitter {
break;
default:

logger.error("not implemented profile: " + ziGateObject.payload.profileID, NS);
logger.debug("not implemented profile: " + ziGateObject.payload.profileID, NS);
}
break;
case ZiGateMessageCode.LeaveIndication:
Expand Down

0 comments on commit 44235eb

Please sign in to comment.