File tree Expand file tree Collapse file tree 22 files changed +241
-71
lines changed
main/java/org/lfenergy/compas/core/commons
main/java/org/lfenergy/compas/core/rest/exception
main/java/org/lfenergy/compas/core/websocket Expand file tree Collapse file tree 22 files changed +241
-71
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,13 @@ SPDX-License-Identifier: Apache-2.0
38
38
</dependency >
39
39
40
40
<dependency >
41
- <groupId >org.slf4j</groupId >
42
- <artifactId >slf4j-api</artifactId >
41
+ <groupId >org.apache.logging.log4j</groupId >
42
+ <artifactId >log4j-api</artifactId >
43
+ </dependency >
44
+ <dependency >
45
+ <groupId >org.apache.logging.log4j</groupId >
46
+ <artifactId >log4j-core</artifactId >
47
+ <scope >provided</scope >
43
48
</dependency >
44
49
45
50
<dependency >
@@ -52,11 +57,6 @@ SPDX-License-Identifier: Apache-2.0
52
57
<artifactId >junit-jupiter-engine</artifactId >
53
58
<scope >test</scope >
54
59
</dependency >
55
- <dependency >
56
- <groupId >org.slf4j</groupId >
57
- <artifactId >slf4j-simple</artifactId >
58
- <scope >test</scope >
59
- </dependency >
60
60
<dependency >
61
61
<groupId >org.hibernate.validator</groupId >
62
62
<artifactId >hibernate-validator</artifactId >
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
package org .lfenergy .compas .core .commons ;
5
5
6
+ import org .apache .logging .log4j .LogManager ;
7
+ import org .apache .logging .log4j .Logger ;
6
8
import org .lfenergy .compas .core .commons .exception .CompasException ;
7
- import org .slf4j .Logger ;
8
- import org .slf4j .LoggerFactory ;
9
9
import org .w3c .dom .Element ;
10
10
import org .xml .sax .InputSource ;
11
11
import org .xml .sax .SAXException ;
27
27
import static org .lfenergy .compas .core .commons .exception .CompasErrorCode .CONVERT_TO_STRING_ERROR ;
28
28
29
29
public class ElementConverter {
30
- private static final Logger LOGGER = LoggerFactory .getLogger (ElementConverter .class );
30
+ private static final Logger LOGGER = LogManager .getLogger (ElementConverter .class );
31
31
32
32
public String convertToString (Element element ) {
33
33
return convertToString (element , true );
Original file line number Diff line number Diff line change 7
7
import com .fasterxml .jackson .databind .ObjectMapper ;
8
8
import com .fasterxml .jackson .databind .node .JsonNodeType ;
9
9
import com .fasterxml .jackson .dataformat .yaml .YAMLFactory ;
10
+ import org .apache .logging .log4j .LogManager ;
11
+ import org .apache .logging .log4j .Logger ;
10
12
import org .lfenergy .compas .core .commons .exception .CompasException ;
11
- import org .slf4j .Logger ;
12
- import org .slf4j .LoggerFactory ;
13
13
import org .xml .sax .SAXException ;
14
14
15
15
import javax .xml .XMLConstants ;
30
30
import static org .lfenergy .compas .core .commons .exception .CompasErrorCode .*;
31
31
32
32
public abstract class MarshallerWrapper <T > {
33
- private static final Logger LOGGER = LoggerFactory .getLogger (MarshallerWrapper .class );
33
+ private static final Logger LOGGER = LogManager .getLogger (MarshallerWrapper .class );
34
34
35
35
private final Unmarshaller jaxbUnmarshaller ;
36
36
private final Marshaller jaxbMarshaller ;
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
package org .lfenergy .compas .core .commons .constraint .impl ;
5
5
6
+ import org .apache .logging .log4j .LogManager ;
7
+ import org .apache .logging .log4j .Logger ;
6
8
import org .lfenergy .compas .core .commons .constraint .XmlAnyElementValid ;
7
- import org .slf4j .Logger ;
8
- import org .slf4j .LoggerFactory ;
9
9
import org .w3c .dom .Element ;
10
10
11
11
import javax .validation .ConstraintValidator ;
17
17
* element are correct and also if the element(s) in the list have the correct Local Name and the correct Namespace.
18
18
*/
19
19
public class XmlAnyElementConstraintValidator implements ConstraintValidator <XmlAnyElementValid , List <Element >> {
20
- private static final Logger LOGGER = LoggerFactory .getLogger (XmlAnyElementConstraintValidator .class );
20
+ private static final Logger LOGGER = LogManager .getLogger (XmlAnyElementConstraintValidator .class );
21
21
22
22
private String elementName ;
23
23
private String elementNamespace ;
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ SPDX-FileCopyrightText: 2022 Alliander N.V.
4
+
5
+ SPDX-License-Identifier: Apache-2.0
6
+ -->
7
+ <Configuration strict =" true" name =" TestConfiguration" >
8
+ <Appenders >
9
+ <Appender type =" Console" name =" STDOUT" >
10
+ <Layout type =" PatternLayout" pattern =" %d %p %C{3.} [%t] %m%n" />
11
+ </Appender >
12
+ </Appenders >
13
+
14
+ <Loggers >
15
+ <Logger name =" org.lfenergy.compas" level =" debug" additivity =" false" >
16
+ <AppenderRef ref =" STDOUT" />
17
+ </Logger >
18
+
19
+ <Root level =" debug" >
20
+ <AppenderRef ref =" STDOUT" />
21
+ </Root >
22
+ </Loggers >
23
+ </Configuration >
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ SPDX-License-Identifier: Apache-2.0
21
21
22
22
<compas .scl.xsd.version>0.0.4</compas .scl.xsd.version>
23
23
<quarkus .platform.version>2.14.1.Final</quarkus .platform.version>
24
- <slf4j .version>2.0.4</slf4j .version>
25
24
<jaxb .bind.version>2.3.7</jaxb .bind.version>
25
+ <log4j2 .version>2.19.0</log4j2 .version>
26
26
<openpojo .version>0.9.1</openpojo .version>
27
27
</properties >
28
28
@@ -91,14 +91,14 @@ SPDX-License-Identifier: Apache-2.0
91
91
</dependency >
92
92
93
93
<dependency >
94
- <groupId >org.slf4j </groupId >
95
- <artifactId >slf4j -api</artifactId >
96
- <version >${slf4j .version} </version >
94
+ <groupId >org.apache.logging.log4j </groupId >
95
+ <artifactId >log4j -api</artifactId >
96
+ <version >${log4j2 .version} </version >
97
97
</dependency >
98
98
<dependency >
99
- <groupId >org.slf4j </groupId >
100
- <artifactId >slf4j-simple </artifactId >
101
- <version >${slf4j .version} </version >
99
+ <groupId >org.apache.logging.log4j </groupId >
100
+ <artifactId >log4j-core </artifactId >
101
+ <version >${log4j2 .version} </version >
102
102
</dependency >
103
103
104
104
<dependency >
Original file line number Diff line number Diff line change @@ -29,8 +29,13 @@ SPDX-License-Identifier: Apache-2.0
29
29
</dependency >
30
30
31
31
<dependency >
32
- <groupId >org.slf4j</groupId >
33
- <artifactId >slf4j-api</artifactId >
32
+ <groupId >org.apache.logging.log4j</groupId >
33
+ <artifactId >log4j-api</artifactId >
34
+ </dependency >
35
+ <dependency >
36
+ <groupId >org.apache.logging.log4j</groupId >
37
+ <artifactId >log4j-core</artifactId >
38
+ <scope >provided</scope >
34
39
</dependency >
35
40
36
41
<dependency >
@@ -54,11 +59,5 @@ SPDX-License-Identifier: Apache-2.0
54
59
<artifactId >resteasy-core</artifactId >
55
60
<scope >test</scope >
56
61
</dependency >
57
-
58
- <dependency >
59
- <groupId >org.slf4j</groupId >
60
- <artifactId >slf4j-simple</artifactId >
61
- <scope >test</scope >
62
- </dependency >
63
62
</dependencies >
64
63
</project >
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
package org .lfenergy .compas .core .rest .exception ;
5
5
6
+ import org .apache .logging .log4j .LogManager ;
7
+ import org .apache .logging .log4j .Logger ;
6
8
import org .lfenergy .compas .core .commons .exception .CompasException ;
7
9
import org .lfenergy .compas .core .commons .model .ErrorResponse ;
8
- import org .slf4j .Logger ;
9
- import org .slf4j .LoggerFactory ;
10
10
11
11
import javax .ws .rs .core .Response ;
12
12
import javax .ws .rs .ext .ExceptionMapper ;
13
13
import javax .ws .rs .ext .Provider ;
14
14
15
15
@ Provider
16
16
public class CompasExceptionHandler implements ExceptionMapper <CompasException > {
17
- private static final Logger LOGGER = LoggerFactory .getLogger (CompasExceptionHandler .class );
17
+ private static final Logger LOGGER = LogManager .getLogger (CompasExceptionHandler .class );
18
18
19
19
@ Override
20
20
public Response toResponse (CompasException exception ) {
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
package org .lfenergy .compas .core .rest .exception ;
5
5
6
+ import org .apache .logging .log4j .LogManager ;
7
+ import org .apache .logging .log4j .Logger ;
6
8
import org .lfenergy .compas .core .commons .model .ErrorResponse ;
7
- import org .slf4j .Logger ;
8
- import org .slf4j .LoggerFactory ;
9
9
10
10
import javax .validation .ConstraintViolationException ;
11
11
import javax .ws .rs .core .Response ;
16
16
17
17
@ Provider
18
18
public class ConstraintViolationExceptionHandler implements ExceptionMapper <ConstraintViolationException > {
19
- private static final Logger LOGGER = LoggerFactory .getLogger (ConstraintViolationExceptionHandler .class );
19
+ private static final Logger LOGGER = LogManager .getLogger (ConstraintViolationExceptionHandler .class );
20
20
21
21
@ Override
22
22
public Response toResponse (ConstraintViolationException exception ) {
Original file line number Diff line number Diff line change 3
3
// SPDX-License-Identifier: Apache-2.0
4
4
package org .lfenergy .compas .core .rest .exception ;
5
5
6
+ import org .apache .logging .log4j .LogManager ;
7
+ import org .apache .logging .log4j .Logger ;
6
8
import org .lfenergy .compas .core .commons .model .ErrorResponse ;
7
- import org .slf4j .Logger ;
8
- import org .slf4j .LoggerFactory ;
9
9
10
10
import javax .ws .rs .core .Response ;
11
11
import javax .ws .rs .ext .ExceptionMapper ;
15
15
16
16
@ Provider
17
17
public class GenericExceptionHandler implements ExceptionMapper <Throwable > {
18
- private static final Logger LOGGER = LoggerFactory .getLogger (GenericExceptionHandler .class );
18
+ private static final Logger LOGGER = LogManager .getLogger (GenericExceptionHandler .class );
19
19
20
20
public static final String ERROR_MESSAGE = "Unknown exception occurred." ;
21
21
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ SPDX-FileCopyrightText: 2022 Alliander N.V.
4
+
5
+ SPDX-License-Identifier: Apache-2.0
6
+ -->
7
+ <Configuration strict =" true" name =" TestConfiguration" >
8
+ <Appenders >
9
+ <Appender type =" Console" name =" STDOUT" >
10
+ <Layout type =" PatternLayout" pattern =" %d %p %C{3.} [%t] %m%n" />
11
+ </Appender >
12
+ </Appenders >
13
+
14
+ <Loggers >
15
+ <Logger name =" org.lfenergy.compas" level =" debug" additivity =" false" >
16
+ <AppenderRef ref =" STDOUT" />
17
+ </Logger >
18
+
19
+ <Root level =" debug" >
20
+ <AppenderRef ref =" STDOUT" />
21
+ </Root >
22
+ </Loggers >
23
+ </Configuration >
Original file line number Diff line number Diff line change @@ -28,6 +28,16 @@ SPDX-License-Identifier: Apache-2.0
28
28
<artifactId >jakarta.xml.bind-api</artifactId >
29
29
</dependency >
30
30
31
+ <dependency >
32
+ <groupId >org.apache.logging.log4j</groupId >
33
+ <artifactId >log4j-api</artifactId >
34
+ </dependency >
35
+ <dependency >
36
+ <groupId >org.apache.logging.log4j</groupId >
37
+ <artifactId >log4j-core</artifactId >
38
+ <scope >provided</scope >
39
+ </dependency >
40
+
31
41
<dependency >
32
42
<groupId >org.junit.jupiter</groupId >
33
43
<artifactId >junit-jupiter-api</artifactId >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ SPDX-FileCopyrightText: 2022 Alliander N.V.
4
+
5
+ SPDX-License-Identifier: Apache-2.0
6
+ -->
7
+ <Configuration strict =" true" name =" TestConfiguration" >
8
+ <Appenders >
9
+ <Appender type =" Console" name =" STDOUT" >
10
+ <Layout type =" PatternLayout" pattern =" %d %p %C{3.} [%t] %m%n" />
11
+ </Appender >
12
+ </Appenders >
13
+
14
+ <Loggers >
15
+ <Logger name =" org.lfenergy.compas" level =" debug" additivity =" false" >
16
+ <AppenderRef ref =" STDOUT" />
17
+ </Logger >
18
+
19
+ <Root level =" debug" >
20
+ <AppenderRef ref =" STDOUT" />
21
+ </Root >
22
+ </Loggers >
23
+ </Configuration >
Original file line number Diff line number Diff line change @@ -46,8 +46,13 @@ SPDX-License-Identifier: Apache-2.0
46
46
</dependency >
47
47
48
48
<dependency >
49
- <groupId >org.slf4j</groupId >
50
- <artifactId >slf4j-api</artifactId >
49
+ <groupId >org.apache.logging.log4j</groupId >
50
+ <artifactId >log4j-api</artifactId >
51
+ </dependency >
52
+ <dependency >
53
+ <groupId >org.apache.logging.log4j</groupId >
54
+ <artifactId >log4j-core</artifactId >
55
+ <scope >provided</scope >
51
56
</dependency >
52
57
53
58
<dependency >
@@ -60,11 +65,6 @@ SPDX-License-Identifier: Apache-2.0
60
65
<artifactId >junit-jupiter-engine</artifactId >
61
66
<scope >test</scope >
62
67
</dependency >
63
- <dependency >
64
- <groupId >org.slf4j</groupId >
65
- <artifactId >slf4j-simple</artifactId >
66
- <scope >test</scope >
67
- </dependency >
68
68
</dependencies >
69
69
70
70
<build >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ SPDX-FileCopyrightText: 2022 Alliander N.V.
4
+
5
+ SPDX-License-Identifier: Apache-2.0
6
+ -->
7
+ <Configuration strict =" true" name =" TestConfiguration" >
8
+ <Appenders >
9
+ <Appender type =" Console" name =" STDOUT" >
10
+ <Layout type =" PatternLayout" pattern =" %d %p %C{3.} [%t] %m%n" />
11
+ </Appender >
12
+ </Appenders >
13
+
14
+ <Loggers >
15
+ <Logger name =" org.lfenergy.compas" level =" debug" additivity =" false" >
16
+ <AppenderRef ref =" STDOUT" />
17
+ </Logger >
18
+
19
+ <Root level =" debug" >
20
+ <AppenderRef ref =" STDOUT" />
21
+ </Root >
22
+ </Loggers >
23
+ </Configuration >
Original file line number Diff line number Diff line change @@ -46,8 +46,13 @@ SPDX-License-Identifier: Apache-2.0
46
46
</dependency >
47
47
48
48
<dependency >
49
- <groupId >org.slf4j</groupId >
50
- <artifactId >slf4j-api</artifactId >
49
+ <groupId >org.apache.logging.log4j</groupId >
50
+ <artifactId >log4j-api</artifactId >
51
+ </dependency >
52
+ <dependency >
53
+ <groupId >org.apache.logging.log4j</groupId >
54
+ <artifactId >log4j-core</artifactId >
55
+ <scope >provided</scope >
51
56
</dependency >
52
57
53
58
<dependency >
@@ -60,11 +65,6 @@ SPDX-License-Identifier: Apache-2.0
60
65
<artifactId >junit-jupiter-engine</artifactId >
61
66
<scope >test</scope >
62
67
</dependency >
63
- <dependency >
64
- <groupId >org.slf4j</groupId >
65
- <artifactId >slf4j-simple</artifactId >
66
- <scope >test</scope >
67
- </dependency >
68
68
</dependencies >
69
69
70
70
<build >
You can’t perform that action at this time.
0 commit comments