Java Code Examples for org.gradle.api.logging.LogLevel#ERROR
The following examples show how to use
org.gradle.api.logging.LogLevel#ERROR .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogLevelConverter.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
/** * Maps a Logback log level and optional marker to a Gradle log level. * Returns null if there is no equivalent Gradle log level (such as for TRACE). */ @Nullable public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) { switch(level.toInt()) { case Level.TRACE_INT: return null; case Level.DEBUG_INT: return LogLevel.DEBUG; case Level.INFO_INT: if (marker == Logging.LIFECYCLE) { return LogLevel.LIFECYCLE; } if (marker == Logging.QUIET) { return LogLevel.QUIET; } return LogLevel.INFO; case Level.WARN_INT: return LogLevel.WARN; case Level.ERROR_INT: return LogLevel.ERROR; default: throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level"); } }
Example 2
Source File: LogLevelConverter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
/** * Maps a Logback log level and optional marker to a Gradle log level. * Returns null if there is no equivalent Gradle log level (such as for TRACE). */ @Nullable public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) { switch(level.toInt()) { case Level.TRACE_INT: return null; case Level.DEBUG_INT: return LogLevel.DEBUG; case Level.INFO_INT: if (marker == Logging.LIFECYCLE) { return LogLevel.LIFECYCLE; } if (marker == Logging.QUIET) { return LogLevel.QUIET; } return LogLevel.INFO; case Level.WARN_INT: return LogLevel.WARN; case Level.ERROR_INT: return LogLevel.ERROR; default: throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level"); } }
Example 3
Source File: LogLevelConverter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
/** * Maps a Logback log level and optional marker to a Gradle log level. * Returns null if there is no equivalent Gradle log level (such as for TRACE). */ @Nullable public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) { switch(level.toInt()) { case Level.TRACE_INT: return null; case Level.DEBUG_INT: return LogLevel.DEBUG; case Level.INFO_INT: if (marker == Logging.LIFECYCLE) { return LogLevel.LIFECYCLE; } if (marker == Logging.QUIET) { return LogLevel.QUIET; } return LogLevel.INFO; case Level.WARN_INT: return LogLevel.WARN; case Level.ERROR_INT: return LogLevel.ERROR; default: throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level"); } }
Example 4
Source File: LogLevelConverter.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
/** * Maps a Logback log level and optional marker to a Gradle log level. * Returns null if there is no equivalent Gradle log level (such as for TRACE). */ @Nullable public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) { switch(level.toInt()) { case Level.TRACE_INT: return null; case Level.DEBUG_INT: return LogLevel.DEBUG; case Level.INFO_INT: if (marker == Logging.LIFECYCLE) { return LogLevel.LIFECYCLE; } if (marker == Logging.QUIET) { return LogLevel.QUIET; } return LogLevel.INFO; case Level.WARN_INT: return LogLevel.WARN; case Level.ERROR_INT: return LogLevel.ERROR; default: throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level"); } }
Example 5
Source File: JavaAction.java From putnami-gradle-plugin with GNU Lesser General Public License v3.0 | 5 votes |
protected void printLine(String line) { if (level == LogLevel.ERROR) { System.err.println(line); } else { System.out.println(line); } }
Example 6
Source File: DefaultLoggingManager.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultLoggingManager(LoggingSystem loggingSystem, LoggingSystem stdOutLoggingSystem, LoggingSystem stdErrLoggingSystem, LoggingOutputInternal loggingOutput) { this.loggingOutput = loggingOutput; this.loggingSystem = new StartableLoggingSystem(loggingSystem, null); this.stdOutLoggingSystem = new StartableLoggingSystem(stdOutLoggingSystem, LogLevel.QUIET); this.stdErrLoggingSystem = new StartableLoggingSystem(stdErrLoggingSystem, LogLevel.ERROR); }
Example 7
Source File: OutputEventRenderer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onNonError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() != LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 8
Source File: OutputEventRenderer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() == LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 9
Source File: DefaultLoggingManager.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultLoggingManager(LoggingSystem loggingSystem, LoggingSystem stdOutLoggingSystem, LoggingSystem stdErrLoggingSystem, LoggingOutputInternal loggingOutput) { this.loggingOutput = loggingOutput; this.loggingSystem = new StartableLoggingSystem(loggingSystem, null); this.stdOutLoggingSystem = new StartableLoggingSystem(stdOutLoggingSystem, LogLevel.QUIET); this.stdErrLoggingSystem = new StartableLoggingSystem(stdErrLoggingSystem, LogLevel.ERROR); }
Example 10
Source File: OutputEventRenderer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onNonError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() != LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 11
Source File: DefaultLoggingManager.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultLoggingManager(LoggingSystem loggingSystem, LoggingSystem stdOutLoggingSystem, LoggingSystem stdErrLoggingSystem, LoggingOutputInternal loggingOutput) { this.loggingOutput = loggingOutput; this.loggingSystem = new StartableLoggingSystem(loggingSystem, null); this.stdOutLoggingSystem = new StartableLoggingSystem(stdOutLoggingSystem, LogLevel.QUIET); this.stdErrLoggingSystem = new StartableLoggingSystem(stdErrLoggingSystem, LogLevel.ERROR); }
Example 12
Source File: OutputEventRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onNonError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() != LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 13
Source File: OutputEventRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() == LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 14
Source File: DefaultLoggingManager.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultLoggingManager(LoggingSystem loggingSystem, LoggingSystem stdOutLoggingSystem, LoggingSystem stdErrLoggingSystem, LoggingOutputInternal loggingOutput) { this.loggingOutput = loggingOutput; this.loggingSystem = new StartableLoggingSystem(loggingSystem, null); this.stdOutLoggingSystem = new StartableLoggingSystem(stdOutLoggingSystem, LogLevel.QUIET); this.stdErrLoggingSystem = new StartableLoggingSystem(stdErrLoggingSystem, LogLevel.ERROR); }
Example 15
Source File: OutputEventRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onNonError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() != LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 16
Source File: OutputEventRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private OutputEventListener onError(final OutputEventListener listener) { return new OutputEventListener() { public void onOutput(OutputEvent event) { if (event.getLogLevel() == LogLevel.ERROR || event.getLogLevel() == null) { listener.onOutput(event); } } }; }
Example 17
Source File: NoOpLoggingManager.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public LogLevel getStandardErrorCaptureLevel() { return LogLevel.ERROR; }
Example 18
Source File: NoOpLoggingManager.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public LogLevel getStandardErrorCaptureLevel() { return LogLevel.ERROR; }
Example 19
Source File: NoOpLoggingManager.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public LogLevel getStandardErrorCaptureLevel() { return LogLevel.ERROR; }
Example 20
Source File: NoOpLoggingManager.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public LogLevel getStandardErrorCaptureLevel() { return LogLevel.ERROR; }