Added logs in Soft Stop
MODIFY
src/scheduler/tasks/CloseTransactionsInProgressTask.ts
src/scheduler/tasks/CloseTransactionsInProgressTask.ts
@@ -4,6 +4,7 @@ import Constants from '../../utils/Constants';
import LockingHelper from '../../locking/LockingHelper';
import LockingManager from '../../locking/LockingManager';
import Logging from '../../utils/Logging';
+import LoggingHelper from '../../utils/LoggingHelper';
import OCPPService from '../../server/ocpp/services/OCPPService';
import { ServerAction } from '../../types/Server';
import Tenant from '../../types/Tenant';
@@ -33,12 +34,22 @@ export default class CloseTransactionsInProgressTask extends TenantSchedulerTask
// Soft stop transaction
if (await ocppService.softStopTransaction(tenant, transaction, transaction.chargeBox, transaction.siteArea)) {
result.inSuccess++;
+ await Logging.logInfo({
+ ...LoggingHelper.getTransactionProperties(transaction),
+ tenantID: tenant.id,
+ actionOnUser: transaction.userID,
+ module: MODULE_NAME, method: 'processTenant',
+ message: `${Utils.buildConnectorInfo(transaction.connectorId, transaction.id)} Transaction has been soft stopped successfully`,
+ action: ServerAction.TRANSACTION_SOFT_STOP,
+ detailedMessages: { transaction }
+ });
} else {
result.inError++;
}
} catch (error) {
result.inError++;
await Logging.logError({
+ ...LoggingHelper.getTransactionProperties(transaction),
tenantID: tenant.id,
action: ServerAction.TRANSACTION_SOFT_STOP,
module: MODULE_NAME, method: 'processTenant',

MODIFY
src/server/rest/v1/service/TransactionService.ts
src/server/rest/v1/service/TransactionService.ts
@@ -398,11 +398,11 @@ export default class TransactionService {
});
}
await Logging.logInfo({
+ ...LoggingHelper.getChargingStationProperties(chargingStation),
tenantID: req.user.tenantID,
user: req.user, actionOnUser: transaction.userID,
module: MODULE_NAME, method: 'handleTransactionSoftStop',
- ...LoggingHelper.getChargingStationProperties(chargingStation),
- message: `${Utils.buildConnectorInfo(transaction.connectorId, transaction.id)} Transaction has been stopped successfully`,
+ message: `${Utils.buildConnectorInfo(transaction.connectorId, transaction.id)} Transaction has been soft stopped successfully`,
action: action,
detailedMessages: { transaction }
});

Added logs in Soft Stop