logger.error(
`${this.logPrefix()} Incoming OCPP command '${
commandName ?? requestCommandName ?? null
- }' message '${data.toString()}' matching cached request '${JSON.stringify(
- this.requests.get(messageId)
- )}' processing error:`,
+ }' message '${data.toString()}'${
+ messageType !== MessageType.CALL_MESSAGE
+ ? ` matching cached request '${JSON.stringify(this.requests.get(messageId))}'`
+ : ''
+ } processing error:`,
error
);
if (error instanceof OCPPError === false) {
-import { threadId } from 'worker_threads';
-
import chalk from 'chalk';
export class WorkerUtils {
public static defaultExitHandler = (code: number): void => {
if (code !== 0) {
- console.error(chalk.red(`Worker ${threadId} stopped with exit code ${code}`));
+ console.error(chalk.red(`Worker stopped with exit code ${code}`));
}
};
}