File tree 2 files changed +18
-1
lines changed
log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -285,10 +285,17 @@ public Integer convert(final String s) {
285
285
}
286
286
287
287
/**
288
- * Converts a {@link String} into a Log4j {@link Level}. Returns {@code null} for invalid level names.
288
+ * Converts a {@link String} into a Log4j {@link Level}.
289
289
*/
290
290
@ Plugin (name = "Level" , category = CATEGORY )
291
291
public static class LevelConverter implements TypeConverter <Level > {
292
+ /**
293
+ * {@inheritDoc}
294
+ * @param s the string to convert
295
+ * @return the resolved level
296
+ * @throws NullPointerException if the given value is {@code null}.
297
+ * @throws IllegalArgumentException if the given argument is not resolvable to a level
298
+ */
292
299
@ Override
293
300
public Level convert (final String s ) {
294
301
return Level .valueOf (s );
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <entry xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xmlns =" https://logging.apache.org/xml/ns"
4
+ xsi : schemaLocation =" https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
5
+ type =" fixed" >
6
+ <issue id =" 3359" link =" https://github.com/apache/logging-log4j2/issues/3359" />
7
+ <description format =" asciidoc" >
8
+ TypeConverters convert for "Level" incorrectly documented behaviour for invalid value - updated javadoc.
9
+ </description >
10
+ </entry >
You can’t perform that action at this time.
0 commit comments