Package io.airlift.log
Class Logging
java.lang.Object
io.airlift.log.Logging
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
Modifier and TypeMethodDescriptionvoidclearLevel(String loggerName) voidconfigure(LoggingConfiguration config) voidstatic LoggingSets up default logging:voidlogToFile(String logPath, io.airlift.units.DataSize maxFileSize, io.airlift.units.DataSize maxTotalSize, RollingFileMessageOutput.CompressionType compressionType, Formatter formatter) voidvoidvoidsetRootLevel(Level newLevel)
-
Method Details
-
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
-
setRootLevel
-
setLevels
- Throws:
IOException
-
getLevel
-
clearLevel
-
setLevel
-
getAllLevels
-
configure
-