Class LogbackConfiguration
- java.lang.Object
-
- org.eclipse.rdf4j.common.app.logging.base.AbstractLogConfiguration
-
- org.eclipse.rdf4j.common.app.logging.logback.LogbackConfiguration
-
- All Implemented Interfaces:
Configuration
,LogConfiguration
public class LogbackConfiguration extends AbstractLogConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
configFile
private LogConfigurator
configurator
private static java.lang.String
LOGBACK_CONFIG_FILE
private org.slf4j.Logger
logger
static java.lang.String
LOGGING_DIR_PROPERTY
-
Fields inherited from interface org.eclipse.rdf4j.common.app.config.Configuration
DEFAULT_RESOURCES_LOCATION, DIR, RESOURCES_LOCATION
-
Fields inherited from interface org.eclipse.rdf4j.common.app.logging.LogConfiguration
ADMIN_EVENT_LOG_FILE, ADMIN_EVENT_LOGGER_NAME, LOG_FILE, LOGGING_DIR, USER_EVENT_LOG_FILE, USER_EVENT_LOGGER_NAME
-
-
Constructor Summary
Constructors Constructor Description LogbackConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Clean up configuration resources.private java.io.File
getConfigFile()
LogReader
getDefaultLogReader()
Default (fallback) LogReader instance.LogReader
getLogReader(java.lang.String appender)
A reader that can read logging information as stored by the specific logger's appender.void
init()
Initialize the configuration settings.void
load()
Load the configuration settings.void
save()
Store configuration settings.-
Methods inherited from class org.eclipse.rdf4j.common.app.logging.base.AbstractLogConfiguration
getAppConfiguration, getBaseDir, getConfDir, getLoggingDir, getPackages, isDebugLoggingEnabled, setAppConfiguration, setBaseDir, setDebugLoggingEnabled
-
-
-
-
Field Detail
-
LOGGING_DIR_PROPERTY
public static final java.lang.String LOGGING_DIR_PROPERTY
- See Also:
- Constant Field Values
-
LOGBACK_CONFIG_FILE
private static final java.lang.String LOGBACK_CONFIG_FILE
- See Also:
- Constant Field Values
-
logger
private final org.slf4j.Logger logger
-
configFile
private java.io.File configFile
-
configurator
private LogConfigurator configurator
-
-
Method Detail
-
init
public void init() throws java.io.IOException
Description copied from interface:Configuration
Initialize the configuration settings.- Throws:
java.io.IOException
- if the configuration settings could not be initialized because of an I/O problem.
-
load
public void load() throws java.io.IOException
Description copied from interface:Configuration
Load the configuration settings. Settings will be loaded from a user and application specific location first. If no such settings exists, an attempt will be made to retrieve settings from a resource on the classpath. If no such settings exist either, settings will be loaded from a default resource on the classpath.- Throws:
java.io.IOException
- if the configuration settings could not be loaded due to an I/O problem.
-
save
public void save() throws java.io.IOException
Description copied from interface:Configuration
Store configuration settings. Settings will be stored in a user and application specific location.- Throws:
java.io.IOException
- if the configuration settings could not be saved due to an I/O problem.
-
destroy
public void destroy()
Description copied from interface:Configuration
Clean up configuration resources.
-
getConfigFile
private java.io.File getConfigFile() throws java.io.IOException
- Throws:
java.io.IOException
-
getLogReader
public LogReader getLogReader(java.lang.String appender)
Description copied from interface:LogConfiguration
A reader that can read logging information as stored by the specific logger's appender.- Parameters:
appender
- Name of the appender to which the LogReader is attached- Returns:
- a reader that can read logging information as stored by the logger configured through this LogConfiguration
-
getDefaultLogReader
public LogReader getDefaultLogReader()
Description copied from interface:LogConfiguration
Default (fallback) LogReader instance.- Returns:
- default (fallback) LogReader instance.
-
-