Class Logging

java.lang.Object
io.airlift.log.Logging

public class Logging extends Object
Initializes the logging subsystem.

java.util.Logging, System.out and System.err are tunneled through the logging system.

System.out and System.err are assigned to loggers named "stdout" and "stderr", respectively.

  • Method Details

    • initialize

      public static Logging initialize()
      Sets up default logging:

      - INFO level - Log entries are written to stderr

      Returns:
      the logging system singleton
    • disableConsole

      public void disableConsole()
    • logToFile

      public void logToFile(String logPath, io.airlift.units.DataSize maxFileSize, io.airlift.units.DataSize maxTotalSize, RollingFileMessageOutput.CompressionType compressionType, Formatter formatter)
    • getRootLevel

      public Level getRootLevel()
    • setRootLevel

      public void setRootLevel(Level newLevel)
    • setLevels

      public void setLevels(String file) throws IOException
      Throws:
      IOException
    • getLevel

      public Level getLevel(String loggerName)
    • clearLevel

      public void clearLevel(String loggerName)
    • setLevel

      public void setLevel(String loggerName, Level level)
    • getAllLevels

      public Map<String,Level> getAllLevels()
    • configure

      public void configure(LoggingConfiguration config)