Class DefaultLoggerCreator
java.lang.Object
org.kawanfw.sql.api.server.logging.DefaultLoggerCreator
- All Implemented Interfaces:
LoggerCreator
public class DefaultLoggerCreator extends Object implements LoggerCreator
Creates a default Logback/sl4fj Logger for main AceQL activity.
Logger has default characteristics:
See the DefaultLoggerCreator.properties format.
- name: DefaultLoggerCreator
- Log directory:
user.home/.kawansoft/log
- File name pattern:
"aceql_%d.log.%i"
(example of file created:aceql_2022-07-01.log.1
.) - Pattern of each line of log:
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"}
- Maximum File Size: 300Mb
- Total Size Cap: 30Gb
DefaultLoggerCreator.properties
file in
user.home/.kawansoft/conf
. See the DefaultLoggerCreator.properties format.
- Author:
- Nicolas de Pomereu
-
Constructor Summary
Constructors Constructor Description DefaultLoggerCreator()
Constructor -
Method Summary
Modifier and Type Method Description Map<String,String>
getElements()
Return the elements of theLogger
: name, fileNamePattern, etc.org.slf4j.Logger
getLogger()
Returns the Logger as sl4fj instance
-
Constructor Details
-
DefaultLoggerCreator
Constructor- Throws:
IOException
- if any I/O error occurs when accessing theDefaultLoggerCreator.properties
file.FileNotFoundException
- if the theDefaultLoggerCreator.properties
file does not exist.
-
-
Method Details
-
getLogger
public org.slf4j.Logger getLogger()Description copied from interface:LoggerCreator
Returns the Logger as sl4fj instance- Specified by:
getLogger
in interfaceLoggerCreator
- Returns:
- the Logger as sl4fj instance
-
getElements
Description copied from interface:LoggerCreator
Return the elements of theLogger
: name, fileNamePattern, etc. This allows to give admin users info about theLogger
when stating the programe. Implementation is free.- Specified by:
getElements
in interfaceLoggerCreator
- Returns:
- the elements of the Logger
-