File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ pluginManagement {
2323}
2424
2525/*
26- * Fail the build if any WARN/ ERROR log events occur.
26+ * Fail the build if any ERROR log events occur.
2727 * Some projects forbid *any* build-time logging at these levels;
2828 * this ensures Log4j upgrades don't get blocked by harmless noise.
2929 *
@@ -33,7 +33,7 @@ import org.gradle.internal.logging.events.LogEvent
3333import org.gradle.internal.logging.LoggingManagerInternal
3434def events = []
3535def listener = { e ->
36- if (e instanceof LogEvent && e. logLevel. ordinal() >= LogLevel . WARN . ordinal()) {
36+ if (e instanceof LogEvent && e. logLevel. ordinal() >= LogLevel . ERROR . ordinal()) {
3737 events << e
3838 }
3939}
@@ -49,9 +49,9 @@ gradle.settingsEvaluated {
4949 gradle. buildFinished {
5050 loggingManager. removeOutputEventListener(listener)
5151 if (! events. isEmpty()) {
52- println " \n * Build failed due to ${ events.size()} WARN/ ERROR log event(s):"
52+ println " \n * Build failed due to ${ events.size()} ERROR log event(s):"
5353 events. each { println " [${ it.logLevel} ] ${ it.message} " }
54- throw new GradleException (" Build aborted: disallowed WARN/ ERROR log events detected." )
54+ throw new GradleException (" Build aborted: disallowed ERROR log events detected." )
5555 }
5656 }
5757}
You can’t perform that action at this time.
0 commit comments