Package ch.autumo.commons.logging
Class Log4j2Logging
java.lang.Object
ch.autumo.commons.logging.AbstractLogging
ch.autumo.commons.logging.Log4j2Logging
- All Implemented Interfaces:
Logging
Log4j2 Logging initialization.
-
Field Summary
FieldsFields inherited from class ch.autumo.commons.logging.AbstractLogging
rootPath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionInitialize logging and return logging file path.voidinitialize(String path, String name) Configure the framework specifically with a log configuration file and name!voidinitializeInMemory(String inMemoryConfigName, String appName, org.apache.logging.log4j.Level level, String appenderRef, String packageName) Initialize logging with an in-memory-built log4j2 configurationvoidinitializeInMemoryConsole(String inMemoryConfigName, String appName) Initialize logging with an in-memory-built log4j2 configuration Note: Might have an implementation or not.voidinitializeInMemoryFile(String inMemoryConfigName, String appName) Initialize logging with an in-memory-built log4j2 configuration and appends output to file.
-
Field Details
-
SYSTEM_PROPERTY_LOG_FILE
Log file
-
-
Constructor Details
-
Log4j2Logging
public Log4j2Logging()Default constructor.
-
-
Method Details
-
initialize
Description copied from interface:LoggingInitialize logging and return logging file path.
- Path used: 'cfg/logging.xml'
- Configuration name used: 'default'- Returns:
- logging file path
- Throws:
IOException- when reading the configuration fails
-
initialize
Description copied from interface:LoggingConfigure the framework specifically with a log configuration file and name!- Parameters:
path- a path to the configurationname- name to the configuration- Throws:
IOException- when reading the configuration fails
-
initializeInMemoryFile
Description copied from interface:LoggingInitialize logging with an in-memory-built log4j2 configuration and appends output to file. Note: Might have an implementation or not.- Parameters:
inMemoryConfigName- virtual configuration nameappName- application name that is is used as part of the logging output folder
-
initializeInMemoryConsole
Description copied from interface:LoggingInitialize logging with an in-memory-built log4j2 configuration Note: Might have an implementation or not.- Parameters:
inMemoryConfigName- virtual configuration nameappName- application name that is is used as part of the logging output folder
-
initializeInMemory
public void initializeInMemory(String inMemoryConfigName, String appName, org.apache.logging.log4j.Level level, String appenderRef, String packageName) Initialize logging with an in-memory-built log4j2 configuration- Parameters:
inMemoryConfigName- virtual configuration nameappName- application name that is is used as part of the logging output folder and log file namelevel- log levelappenderRef- file|consolepackageName- package name
-