Log the number of Site Areas processed in Smart Charging
MODIFY
src/scheduler/tasks/CheckAndComputeSmartChargingTask.ts
src/scheduler/tasks/CheckAndComputeSmartChargingTask.ts
@@ -44,7 +44,7 @@ export default class CheckAndComputeSmartChargingTask extends TenantSchedulerTas
tenantID: tenant.id,
module: MODULE_NAME, method: 'processTenant',
action: ServerAction.CHECK_AND_APPLY_SMART_CHARGING,
- message: `Error while running the task '${CheckAndComputeSmartChargingTask.name}': ${error.message}`,
+ message: `Error while running the task '${CheckAndComputeSmartChargingTask.name}': ${error.message as string}`,
detailedMessages: { error: error.stack }
});
} finally {
@@ -53,6 +53,12 @@ export default class CheckAndComputeSmartChargingTask extends TenantSchedulerTas
}
}
}
+ await Logging.logInfo({
+ tenantID: Constants.DEFAULT_TENANT_ID,
+ module: MODULE_NAME, method: 'processTenant',
+ action: ServerAction.CHECK_AND_APPLY_SMART_CHARGING,
+ message: `Processed '${siteAreas.count}' Site Area(s) with Smart Charging`,
+ });
}
}
}

Log the number of Site Areas processed in Smart Charging