@@ -359,6 +359,25 @@ public SecurityEventNotificationResponse securityEventNotification(SecurityEvent
359359
360360 return new SecurityEventNotificationResponse ();
361361 }
362+ public LogStatusNotificationResponse logStatusNotification (LogStatusNotification parameters ,
363+ String chargeBoxIdentity ) {
364+ try {
365+ if (parameters .getRequestId () == null ) {
366+ log .warn ("No requestId in {}" , parameters );
367+ } else {
368+ securityRepository .insertLogUploadStatus (
369+ chargeBoxIdentity ,
370+ parameters .getRequestId (),
371+ parameters .getStatus ().value (),
372+ DateTime .now ()
373+ );
374+ }
375+ } catch (Exception e ) {
376+ log .error ("Error processing log status notification from '{}': {}" , chargeBoxIdentity , e .getMessage (), e );
377+ }
378+
379+ return new LogStatusNotificationResponse ();
380+ }
362381
363382 public SignedFirmwareStatusNotificationResponse signedFirmwareStatusNotification (
364383 SignedFirmwareStatusNotification parameters , String chargeBoxIdentity ) {
@@ -384,30 +403,6 @@ public SignedFirmwareStatusNotificationResponse signedFirmwareStatusNotification
384403 return new SignedFirmwareStatusNotificationResponse ();
385404 }
386405
387- public LogStatusNotificationResponse logStatusNotification (LogStatusNotification parameters , String chargeBoxIdentity ) {
388- var status = parameters .getStatus () != null ? parameters .getStatus ().toString () : "Unknown" ;
389- var requestId = parameters .getRequestId ();
390-
391- log .info ("LogStatus from '{}': status={}, requestId={}" , chargeBoxIdentity , status , requestId );
392-
393- try {
394- if (requestId != null ) {
395- var logFile = securityRepository .getLogFile (requestId );
396-
397- if (logFile != null ) {
398- securityRepository .updateLogFileStatus (requestId , status , null );
399- log .info ("Updated log file status for requestId {} to '{}'" , requestId , status );
400- } else {
401- log .warn ("No log file found for requestId {}" , requestId );
402- }
403- }
404- } catch (Exception e ) {
405- log .error ("Error processing log status notification from '{}': {}" , chargeBoxIdentity , e .getMessage (), e );
406- }
407-
408- return new LogStatusNotificationResponse ();
409- }
410-
411406 // -------------------------------------------------------------------------
412407 // Helpers
413408 // -------------------------------------------------------------------------
0 commit comments