|
23 | 23 | package com.espirit.moddev.cli.exception; |
24 | 24 |
|
25 | 25 | import de.espirit.common.base.Logger; |
| 26 | +import org.apache.logging.log4j.LogManager; |
26 | 27 | import org.jetbrains.annotations.NotNull; |
27 | | -import org.slf4j.LoggerFactory; |
28 | 28 |
|
29 | 29 | /** |
30 | | - * The type FsLoggingBridge is the connection between FS Logging and the SLF4J API. |
| 30 | + * The type FsLoggingBridge is the connection between FS Logging and the Log4j API. |
31 | 31 | */ |
| 32 | +@SuppressWarnings("NonExtendableApiUsage") |
32 | 33 | public class FsLoggingBridge implements Logger { |
33 | 34 |
|
34 | 35 | @Override |
35 | 36 | public boolean isTraceEnabled(@NotNull final Class<?> className) { |
36 | | - return LoggerFactory.getLogger(className).isTraceEnabled(); |
| 37 | + return LogManager.getLogger(className).isTraceEnabled(); |
37 | 38 | } |
38 | 39 |
|
39 | 40 | @Override |
40 | 41 | public boolean isTraceEnabled(@NotNull final String className) { |
41 | | - return LoggerFactory.getLogger(className).isTraceEnabled(); |
| 42 | + return LogManager.getLogger(className).isTraceEnabled(); |
42 | 43 | } |
43 | 44 |
|
44 | 45 | @Override |
45 | 46 | public void logTrace(@NotNull final String message, @NotNull final Class<?> className) { |
46 | | - LoggerFactory.getLogger(className).trace(message); |
| 47 | + LogManager.getLogger(className).trace(message); |
47 | 48 | } |
48 | 49 |
|
49 | 50 | @Override |
50 | 51 | public void logTrace(@NotNull final String message, @NotNull final String className) { |
51 | | - LoggerFactory.getLogger(className).trace(message); |
| 52 | + LogManager.getLogger(className).trace(message); |
52 | 53 | } |
53 | 54 |
|
54 | 55 | @Override |
55 | 56 | public void logTrace(@NotNull final String message, @NotNull final Throwable throwable, final Class<?> className) { |
56 | | - LoggerFactory.getLogger(className).trace(message, throwable); |
| 57 | + LogManager.getLogger(className).trace(message, throwable); |
57 | 58 | } |
58 | 59 |
|
59 | 60 | @Override |
60 | 61 | public void logTrace(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final String className) { |
61 | | - LoggerFactory.getLogger(className).trace(message, throwable); |
| 62 | + LogManager.getLogger(className).trace(message, throwable); |
62 | 63 | } |
63 | 64 |
|
64 | 65 | @Override |
65 | 66 | public boolean isDebugEnabled(@NotNull final Class<?> className) { |
66 | | - return LoggerFactory.getLogger(className).isDebugEnabled(); |
| 67 | + return LogManager.getLogger(className).isDebugEnabled(); |
67 | 68 | } |
68 | 69 |
|
69 | 70 | @Override |
70 | 71 | public boolean isDebugEnabled(@NotNull final String className) { |
71 | | - return LoggerFactory.getLogger(className).isDebugEnabled(); |
| 72 | + return LogManager.getLogger(className).isDebugEnabled(); |
72 | 73 | } |
73 | 74 |
|
74 | 75 | @Override |
75 | 76 | public void logDebug(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final Class<?> className) { |
76 | | - LoggerFactory.getLogger(className).debug(message, throwable); |
| 77 | + LogManager.getLogger(className).debug(message, throwable); |
77 | 78 | } |
78 | 79 |
|
79 | 80 | @Override |
80 | 81 | public void logDebug(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final String className) { |
81 | | - LoggerFactory.getLogger(className).debug(message, throwable); |
| 82 | + LogManager.getLogger(className).debug(message, throwable); |
82 | 83 | } |
83 | 84 |
|
84 | 85 | @Override |
85 | 86 | public void logDebug(@NotNull final String message, @NotNull final Class<?> className) { |
86 | | - LoggerFactory.getLogger(className).debug(message); |
| 87 | + LogManager.getLogger(className).debug(message); |
87 | 88 | } |
88 | 89 |
|
89 | 90 | @Override |
90 | 91 | public void logDebug(@NotNull final String message, @NotNull final String className) { |
91 | | - LoggerFactory.getLogger(className).debug(message); |
| 92 | + LogManager.getLogger(className).debug(message); |
92 | 93 | } |
93 | 94 |
|
94 | 95 | @Override |
95 | 96 | public boolean isInfoEnabled(@NotNull final Class<?> className) { |
96 | | - return LoggerFactory.getLogger(className).isInfoEnabled(); |
| 97 | + return LogManager.getLogger(className).isInfoEnabled(); |
97 | 98 | } |
98 | 99 |
|
99 | 100 | @Override |
100 | 101 | public boolean isInfoEnabled(@NotNull final String className) { |
101 | | - return LoggerFactory.getLogger(className).isInfoEnabled(); |
| 102 | + return LogManager.getLogger(className).isInfoEnabled(); |
102 | 103 | } |
103 | 104 |
|
104 | 105 | @Override |
105 | 106 | public void logInfo(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final Class<?> className) { |
106 | | - LoggerFactory.getLogger(className).info(message, throwable); |
| 107 | + LogManager.getLogger(className).info(message, throwable); |
107 | 108 | } |
108 | 109 |
|
109 | 110 | @Override |
110 | 111 | public void logInfo(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final String className) { |
111 | | - LoggerFactory.getLogger(className).info(message, throwable); |
| 112 | + LogManager.getLogger(className).info(message, throwable); |
112 | 113 | } |
113 | 114 |
|
114 | 115 | @Override |
115 | 116 | public void logInfo(@NotNull final String message, @NotNull final Class<?> className) { |
116 | | - LoggerFactory.getLogger(className).info(message); |
| 117 | + LogManager.getLogger(className).info(message); |
117 | 118 | } |
118 | 119 |
|
119 | 120 | @Override |
120 | 121 | public void logInfo(@NotNull final String message, @NotNull final String className) { |
121 | | - LoggerFactory.getLogger(className).info(message); |
| 122 | + LogManager.getLogger(className).info(message); |
122 | 123 | } |
123 | 124 |
|
124 | 125 | @Override |
125 | 126 | public boolean isWarnEnabled(@NotNull final Class<?> className) { |
126 | | - return LoggerFactory.getLogger(className).isWarnEnabled(); |
| 127 | + return LogManager.getLogger(className).isWarnEnabled(); |
127 | 128 | } |
128 | 129 |
|
129 | 130 | @Override |
130 | 131 | public boolean isWarnEnabled(@NotNull final String className) { |
131 | | - return LoggerFactory.getLogger(className).isWarnEnabled(); |
| 132 | + return LogManager.getLogger(className).isWarnEnabled(); |
132 | 133 | } |
133 | 134 |
|
134 | 135 | @Override |
135 | 136 | public void logWarning(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final Class<?> className) { |
136 | | - LoggerFactory.getLogger(className).warn(message, throwable); |
| 137 | + LogManager.getLogger(className).warn(message, throwable); |
137 | 138 | } |
138 | 139 |
|
139 | 140 | @Override |
140 | 141 | public void logWarning(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final String className) { |
141 | | - LoggerFactory.getLogger(className).warn(message, throwable); |
| 142 | + LogManager.getLogger(className).warn(message, throwable); |
142 | 143 | } |
143 | 144 |
|
144 | 145 | @Override |
145 | 146 | public void logWarning(@NotNull final String message, @NotNull final Class<?> className) { |
146 | | - LoggerFactory.getLogger(className).warn(message); |
| 147 | + LogManager.getLogger(className).warn(message); |
147 | 148 | } |
148 | 149 |
|
149 | 150 | @Override |
150 | 151 | public void logWarning(@NotNull final String message, @NotNull final String className) { |
151 | | - LoggerFactory.getLogger(className).warn(message); |
| 152 | + LogManager.getLogger(className).warn(message); |
152 | 153 | } |
153 | 154 |
|
154 | 155 | @Override |
155 | 156 | public void logError(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final Class<?> className) { |
156 | | - LoggerFactory.getLogger(className).error(message, throwable); |
| 157 | + LogManager.getLogger(className).error(message, throwable); |
157 | 158 | } |
158 | 159 |
|
159 | 160 | @Override |
160 | 161 | public void logError(@NotNull final String message, @NotNull final Throwable throwable, @NotNull final String className) { |
161 | | - LoggerFactory.getLogger(className).error(message, throwable); |
| 162 | + LogManager.getLogger(className).error(message, throwable); |
162 | 163 | } |
163 | 164 |
|
164 | 165 | @Override |
165 | 166 | public void logError(@NotNull final String message, @NotNull final Class<?> className) { |
166 | | - LoggerFactory.getLogger(className).error(message); |
| 167 | + LogManager.getLogger(className).error(message); |
167 | 168 | } |
168 | 169 |
|
169 | 170 | @Override |
170 | 171 | public void logError(@NotNull final String message, @NotNull final String className) { |
171 | | - LoggerFactory.getLogger(className).error(message); |
| 172 | + LogManager.getLogger(className).error(message); |
172 | 173 | } |
173 | 174 |
|
174 | 175 | @Override |
|
0 commit comments