Class Logging

java.lang.Object
org.gradle.api.logging.Logging

public class Logging extends Object

The main entry point for Gradle's logging system. Gradle routes all logging via SLF4J. You can use either an SLF4J Logger or a Gradle Logger to perform logging.

Since:
0.7
  • Field Details

    • LIFECYCLE

      public static final org.slf4j.Marker LIFECYCLE
      The marker for the LogLevel.LIFECYCLE log level.

      Gradle logs an info() message that carries this marker at LogLevel.LIFECYCLE. Gradle recognizes only this object, not its name. A marker from MarkerFactory.getMarker("LIFECYCLE") has no effect.

      Code that depends only on SLF4J can take this marker as a parameter of type Marker. See Showing messages from SLF4J libraries in the build output.

      Since:
      0.7
    • QUIET

      public static final org.slf4j.Marker QUIET
      The marker for the LogLevel.QUIET log level.

      Gradle logs an info() message that carries this marker at LogLevel.QUIET. Gradle recognizes only this object, not its name. A marker from MarkerFactory.getMarker("QUIET") has no effect.

      Code that depends only on SLF4J can take this marker as a parameter of type Marker. See Showing messages from SLF4J libraries in the build output.

      Since:
      0.7
  • Constructor Details

    • Logging

      public Logging()
  • Method Details

    • getLogger

      public static Logger getLogger(Class c)
      Returns the logger for the given class.
      Parameters:
      c - the class.
      Returns:
      the logger. Never returns null.
      Since:
      0.8
    • getLogger

      public static Logger getLogger(String name)
      Returns the logger with the given name.
      Parameters:
      name - the logger name.
      Returns:
      the logger. Never returns null.
      Since:
      0.8