4
4
package org .lfenergy .compas .scl .auto .alignment .rest .v1 ;
5
5
6
6
import io .quarkus .security .Authenticated ;
7
+ import org .apache .logging .log4j .LogManager ;
8
+ import org .apache .logging .log4j .Logger ;
7
9
import org .eclipse .microprofile .jwt .JsonWebToken ;
8
10
import org .lfenergy .compas .scl .auto .alignment .rest .UserInfoProperties ;
9
11
import org .lfenergy .compas .scl .auto .alignment .rest .v1 .model .SclAutoAlignRequest ;
10
12
import org .lfenergy .compas .scl .auto .alignment .rest .v1 .model .SclAutoAlignResponse ;
11
13
import org .lfenergy .compas .scl .auto .alignment .rest .v1 .model .SclAutoAlignSVGRequest ;
12
14
import org .lfenergy .compas .scl .auto .alignment .service .SclAutoAlignmentService ;
13
- import org .slf4j .Logger ;
14
- import org .slf4j .LoggerFactory ;
15
15
16
16
import javax .enterprise .context .RequestScoped ;
17
17
import javax .inject .Inject ;
26
26
@ RequestScoped
27
27
@ Path ("/auto/alignment/v1" )
28
28
public class SclAutoAlignmentResource {
29
- private static final Logger LOGGER = LoggerFactory .getLogger (SclAutoAlignmentResource .class );
29
+ private static final Logger LOGGER = LogManager .getLogger (SclAutoAlignmentResource .class );
30
30
31
31
private final SclAutoAlignmentService sclAutoAlignmentService ;
32
32
@@ -45,6 +45,8 @@ public SclAutoAlignmentResource(SclAutoAlignmentService compasCimMappingService)
45
45
@ Consumes (MediaType .APPLICATION_XML )
46
46
@ Produces (MediaType .APPLICATION_XML )
47
47
public SclAutoAlignResponse alignment (@ Valid SclAutoAlignRequest request ) {
48
+ LOGGER .info ("Auto align SCL for Substation(s) {}." , request .getSubstationNames ());
49
+
48
50
String who = jsonWebToken .getClaim (userInfoProperties .who ());
49
51
LOGGER .trace ("Username used for Who {}" , who );
50
52
@@ -58,6 +60,7 @@ public SclAutoAlignResponse alignment(@Valid SclAutoAlignRequest request) {
58
60
@ Produces (MediaType .APPLICATION_SVG_XML )
59
61
@ Path ("/svg" )
60
62
public String svg (@ Valid SclAutoAlignSVGRequest request ) {
63
+ LOGGER .info ("Creating SVG for Substation {}." , request .getSubstationName ());
61
64
return sclAutoAlignmentService .getSVG (request .getSclData (), request .getSubstationName ());
62
65
}
63
66
}
0 commit comments