Package io.airlift.log
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearLevel(String loggerName)voidconfigure(LoggingConfiguration config)voiddisableConsole()Map<String,Level>getAllLevels()LevelgetLevel(String loggerName)LevelgetRootLevel()static Logginginitialize()Sets up default logging:voidlogToFile(boolean legacyLoggerImplementation, String logPath, int maxHistory, io.airlift.units.DataSize maxFileSize, io.airlift.units.DataSize maxTotalSize, RollingFileHandler.CompressionType compressionType, Format format)voidsetLevel(String loggerName, Level level)voidsetLevels(File file)voidsetRootLevel(Level newLevel)
-
-
-
Method Detail
-
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(boolean legacyLoggerImplementation, String logPath, int maxHistory, io.airlift.units.DataSize maxFileSize, io.airlift.units.DataSize maxTotalSize, RollingFileHandler.CompressionType compressionType, Format format)
-
getRootLevel
public Level getRootLevel()
-
setRootLevel
public void setRootLevel(Level newLevel)
-
setLevels
public void setLevels(File file) throws IOException
- Throws:
IOException
-
clearLevel
public void clearLevel(String loggerName)
-
configure
public void configure(LoggingConfiguration config)
-
-