|
30 | 30 | * Property {@code "log4j2.AsyncQueueFullPolicy"} controls the routing behaviour. If this property is not specified or has
|
31 | 31 | * value {@code "Default"}, this factory creates {@link DefaultAsyncQueueFullPolicy} objects.
|
32 | 32 | * </p> <p>
|
33 |
| - * If this property has value {@code "Discard"}, this factory creates {@link DiscardingAsyncQueueFullPolicy} objects. |
34 |
| - * By default, this router discards events of level {@code INFO}, {@code DEBUG} and {@code TRACE} if the queue is full. |
35 |
| - * This can be adjusted with property {@code "log4j2.DiscardThreshold"} (name of the level at which to start |
36 |
| - * discarding). |
| 33 | + * If this property has value {@code "Discard"}, this factory creates {@link DiscardingAsyncQueueFullPolicy} objects. By |
| 34 | + * default, this router discards events of level {@code ERROR}, {@code WARN}, {@code INFO}, {@code DEBUG} and {@code |
| 35 | + * TRACE} if the queue is full. This can be adjusted with property {@code "log4j2.DiscardThreshold"} (name of the level |
| 36 | + * at which to start discarding). |
37 | 37 | * </p> <p>
|
38 | 38 | * For any other value, this
|
39 | 39 | * factory interprets the value as the fully qualified name of a class implementing the {@link AsyncQueueFullPolicy}
|
@@ -104,8 +104,8 @@ private static AsyncQueueFullPolicy createCustomRouter(final String router) {
|
104 | 104 |
|
105 | 105 | private static AsyncQueueFullPolicy createDiscardingAsyncQueueFullPolicy() {
|
106 | 106 | final PropertiesUtil util = PropertiesUtil.getProperties();
|
107 |
| - final String level = util.getStringProperty(PROPERTY_NAME_DISCARDING_THRESHOLD_LEVEL, Level.INFO.name()); |
108 |
| - final Level thresholdLevel = Level.toLevel(level, Level.INFO); |
| 107 | + final String level = util.getStringProperty(PROPERTY_NAME_DISCARDING_THRESHOLD_LEVEL, Level.ERROR.name()); |
| 108 | + final Level thresholdLevel = Level.toLevel(level, Level.ERROR); |
109 | 109 | LOGGER.debug("Creating custom DiscardingAsyncQueueFullPolicy(discardThreshold:{})", thresholdLevel);
|
110 | 110 | return new DiscardingAsyncQueueFullPolicy(thresholdLevel);
|
111 | 111 | }
|
|
0 commit comments