public class LoggingFraction extends Logging<LoggingFraction> implements Fraction<LoggingFraction>
Logging.LoggingResources
Modifier and Type | Field and Description |
---|---|
static String |
COLOR_PATTERN |
static String |
CONSOLE |
static String |
PATTERN |
Constructor and Description |
---|
LoggingFraction() |
Modifier and Type | Method and Description |
---|---|
LoggingFraction |
applyDefaults()
Apply whatever defaults are required.
|
LoggingFraction |
applyDefaults(Level level) |
List<AsyncHandler> |
asyncHandlers()
Get the list of AsyncHandlers for this logger
|
LoggingFraction |
consoleHandler(Level level,
String formatter)
Add a ConsoleHandler to the list of handlers for this logger.
|
List<ConsoleHandler> |
consoleHandlers()
Get the list of ConsoleHandlers for this logger
|
static LoggingFraction |
createDebugLoggingFraction()
Create a default DEBUG logging fraction.
|
static LoggingFraction |
createDefaultLoggingFraction()
Create a default INFO logging fraction.
|
static LoggingFraction |
createDefaultLoggingFraction(Level level)
Create a default logging fraction for the specified level.
|
static LoggingFraction |
createErrorLoggingFraction()
Create a default ERROR logging fraction.
|
static LoggingFraction |
createTraceLoggingFraction()
Create a default TRACE logging fraction.
|
LoggingFraction |
customFormatter(String name,
String module,
String className)
Add a CustomFormatter to this logger
|
LoggingFraction |
customFormatter(String name,
String module,
String className,
Properties properties)
Add a CustomFormatter to this logger
|
List<CustomFormatter> |
customFormatters()
Get the list of CustomFormatter configurations
|
LoggingFraction |
customHandler(String name,
String module,
String className,
Properties properties,
String formatter)
Add a CustomHandler to this logger
|
List<CustomHandler> |
customHandlers()
Get the list of CustomHandlers for this logger
|
LoggingFraction |
defaultColorFormatter()
Configure a default color formatter named
COLOR_PATTERN . |
LoggingFraction |
defaultFormatter()
Configure a default non-color formatter named
PATTERN . |
LoggingFraction |
fileHandler(String name,
String path,
Level level,
String formatter)
Add a FileHandler to the list of handlers for this logger
|
List<FileHandler> |
fileHandlers()
Get the list of FileHandlers configured on this logger
|
LoggingFraction |
formatter(String name,
String pattern)
Add a new PatternFormatter to this Logger
|
List<PatternFormatter> |
patternFormatters()
Get the list of PatternFormatter configurations
|
LoggingFraction |
rootLogger(Level level,
String... handlers)
Add a root logger to this fraction
|
List<SyslogHandler> |
syslogHandlers()
Get the list of SyslogHandlers for this logger
|
addLoggingApiDependencies, addLoggingApiDependencies, addPropertyChangeListener, asyncHandler, asyncHandler, asyncHandler, asyncHandler, asyncHandlers, consoleHandler, consoleHandler, consoleHandler, consoleHandler, consoleHandlers, customFormatter, customFormatter, customFormatter, customFormatter, customFormatters, customHandler, customHandler, customHandler, customHandler, customHandlers, fileHandler, fileHandler, fileHandler, fileHandler, fileHandlers, getKey, jsonFormatter, jsonFormatter, jsonFormatter, jsonFormatter, jsonFormatters, logFile, logFile, logFile, logFile, logFiles, logger, logger, logger, logger, loggers, loggingProfile, loggingProfile, loggingProfile, loggingProfile, loggingProfiles, patternFormatter, patternFormatter, patternFormatter, patternFormatter, patternFormatters, periodicRotatingFileHandler, periodicRotatingFileHandler, periodicRotatingFileHandler, periodicRotatingFileHandler, periodicRotatingFileHandlers, periodicSizeRotatingFileHandler, periodicSizeRotatingFileHandler, periodicSizeRotatingFileHandler, periodicSizeRotatingFileHandler, periodicSizeRotatingFileHandlers, removePropertyChangeListener, rootLogger, rootLogger, rootLogger, rootLogger, sizeRotatingFileHandler, sizeRotatingFileHandler, sizeRotatingFileHandler, sizeRotatingFileHandler, sizeRotatingFileHandlers, socketHandler, socketHandler, socketHandler, socketHandler, socketHandlers, subresources, syslogHandler, syslogHandler, syslogHandler, syslogHandler, syslogHandlers, useDeploymentLoggingConfig, useDeploymentLoggingConfig, xmlFormatter, xmlFormatter, xmlFormatter, xmlFormatter, xmlFormatters
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyDefaults
public static final String CONSOLE
public static final String PATTERN
public static final String COLOR_PATTERN
public LoggingFraction applyDefaults()
Fraction
applyDefaults
in interface Fraction<LoggingFraction>
Fraction.applyDefaults(boolean)
public LoggingFraction applyDefaults(Level level)
public static LoggingFraction createTraceLoggingFraction()
public static LoggingFraction createDebugLoggingFraction()
public static LoggingFraction createErrorLoggingFraction()
public static LoggingFraction createDefaultLoggingFraction()
public static LoggingFraction createDefaultLoggingFraction(Level level)
public LoggingFraction defaultFormatter()
PATTERN
.public LoggingFraction defaultColorFormatter()
COLOR_PATTERN
.public LoggingFraction formatter(String name, String pattern)
name
- the name of the formatterpattern
- the pattern stringpublic LoggingFraction customFormatter(String name, String module, String className)
name
- the name of the formattermodule
- the module that the logging handler depends onclassName
- the logging handler class to be usedpublic LoggingFraction customFormatter(String name, String module, String className, Properties properties)
name
- the name of the formattermodule
- the module that the logging handler depends onclassName
- the logging handler class to be usedproperties
- the propertiespublic List<PatternFormatter> patternFormatters()
public List<CustomFormatter> customFormatters()
public LoggingFraction consoleHandler(Level level, String formatter)
level
- The logging levelformatter
- A pattern string for the console's formatterpublic List<ConsoleHandler> consoleHandlers()
public LoggingFraction fileHandler(String name, String path, Level level, String formatter)
name
- The name of the handlerpath
- The log file pathlevel
- The logging levelformatter
- The pattern string for the formatterpublic List<FileHandler> fileHandlers()
public LoggingFraction customHandler(String name, String module, String className, Properties properties, String formatter)
name
- the name of the handlermodule
- the module that the handler usesclassName
- the handler class nameproperties
- properties for the handlerformatter
- a pattern string for the formatterpublic List<CustomHandler> customHandlers()
public List<AsyncHandler> asyncHandlers()
public List<SyslogHandler> syslogHandlers()
public LoggingFraction rootLogger(Level level, String... handlers)
level
- the log levelhandlers
- a list of handlersCopyright © 2019 JBoss by Red Hat. All rights reserved.