-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since Logback 1.5.13, there is no more default implementation for the EvaluatorFilter so we need to supply our own. See https://logback.qos.ch/manual/filters.html#evaluatorFilter
- Loading branch information
1 parent
2d1582f
commit 3ef1104
Showing
4 changed files
with
20 additions
and
27 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
core/src/main/java/io/kestra/core/log/KestraLogFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.kestra.core.log; | ||
|
||
import ch.qos.logback.classic.spi.ILoggingEvent; | ||
import ch.qos.logback.core.boolex.EvaluationException; | ||
import ch.qos.logback.core.boolex.EventEvaluatorBase; | ||
|
||
public class KestraLogFilter extends EventEvaluatorBase<ILoggingEvent> { | ||
@Override | ||
public boolean evaluate(ILoggingEvent event) throws NullPointerException, EvaluationException { | ||
var message = event.getMessage(); | ||
// as this filter is called very often, for perf, | ||
// we use startWith and do all checks successfully instead of using a more elegant construct like Stream... | ||
return message.startsWith("outOfOrder mode is active. Migration of schema") || | ||
message.startsWith("Version mismatch : Database version is older than what dialect POSTGRES supports") || | ||
message.startsWith("Failed to bind as java.util.concurrent.Executors$AutoShutdownDelegatedExecutorService is unsupported."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters