Configuration Descriptor: Logger Configuration
This key contains the bundle name that contains the configuration of preferences for canvas logging.
Config Key | Mandatory/ Optional | Type | Purpose |
---|---|---|---|
LOGGING_ENABLED_IND | Mandatory | Boolean | This key is used to turn on or off logging by CT Framework. Turning this off would mean that even exceptions faced are not be logged to any log files. |
LOGGER_CLASS | Optional | String | This key indicates the exact adaptor class that needs to be used by Canvas. |
CT_LOG4J_OVERRIDE_FILE | Mandatory | String | This key indicates the log4j override file for the Sigma Application. |
log.path | Mandatory | Folder Name | This key holds the path where the log files are created. This path configured must be relative to the root path that is configured as CT_WORK_FOLDER_PATH in the implementation property file. |
log.level | Mandatory | LOV | This key is for controlling the logging level. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
Category: Module Wise Log Level | |||
log.level.audit | Mandatory | LOV | This key provides logging level for the audit handling module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.alert | Mandatory | LOV | This key provides logging level for the Alert handling module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.session | Mandatory | LOV | This key provides logging level for the Session management module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.web | Mandatory | LOV | This key provides logging level for the Web layer module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.config | Mandatory | LOV | This key provides logging level for the Configuration module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.cache | Mandatory | LOV | This key provides logging level for the Cache module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.security | Mandatory | LOV | This key provides logging level for the Security module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.database | Mandatory | LOV | This key provides logging level for the Database module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.entitlement | Mandatory | LOV | This key provides logging level for the Entitlement module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.event | Mandatory | LOV | This key provides logging level for the Event definition and handling module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.export | Mandatory | LOV | This key provides logging level for the Export module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.vdf | Mandatory | LOV | This key provides logging level for the metadata module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.hal | Mandatory | LOV | This key provides logging level for the Host Access Layer module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.report | Mandatory | LOV | This key provides logging level for the Reporting module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.validator | Mandatory | LOV | This key provides logging level for the Validation module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.scheduler | Mandatory | LOV | This key provides logging level for the Scheduler module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.reqmodel | Optional | LOV | This key provides logging level for the Request Modeler module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
log.level.dataimport | Optional | LOV | This key provides logging level for the Data Import module. Possible values are - debug, error, info, fatal, warn, and off. Default value is debug. |
Category: Log file related | |||
rollovermodel | Mandatory | LOV | This key enables you to choose any of the following two models supported by Canvas Log appender namely:
The default value is BACKUPOLD. |
datepattern | Mandatory | Date Format | This key defines the following:
The default value is yyyy-MM-dd. |
maxsizelimit | Optional | Size in MB, KB, MB or GB | This key decides on the maximum file size of a log file considering the rollover period. When the file size exceeds the set value, a new file with same period is generated with rolling index incremented by one. The appender expects size value in "KB", "MB" or "GB". The default value is 10 MB. |
suffixorprefix | Mandatory | LOV | This key expects any one of the following values to create the log file name:
|
patternseparator | Optional | Any Character | This key provides the character that is used as a separator in the date pattern in the file name. |
The following is a sample logger configuration Sigmaloggerconfig.properties (as per the name given in the default descriptor):
# This configuration provides the information to the CT framework for handling its logging ############################################################################## # This flag is used to turn on of off logging by CT Framework. # Turning this off would mean that even Exceptions faced will not be logged to any log file!!! LOGGING_ENABLED_IND=true # Indicate the log4j2 adaptor class that we want Canvas to use. LOGGER_CLASS = com.intellectdesign.canvas.logging.log4j2.CanvasLog4j2LoggerImpl # Indicate the exact adaptor class that we want Canvas to use. #LOGGER_CLASS = com.intellectdesign.canvas.logging.log4j1x.CanvasSLF4jLoggerImpl # Indicate the log4j override file for this application CT_LOG4J_OVERRIDE_FILE=Sigma-log4j.xml # Indicate the log4j configuration file to override the default one provided by framework. Configure this value to override xml and ensure the default # appenders from work also present in the override file. # In case of log4j2 is used, the framework also supports to write the logs in the JSON format instead of log file pattern. To enable this use the following # file from CTLogging-Log4j-2x.jar as below. If you need any customization to this configuration please copy the contents of the file to your customized file # and configure the same for below property. # For sigma we have customized json configuration file. You can use this configuration for json logging. #CT_LOG4J_OVERRIDE_FILE=Sigma-json-log4j2.xml # This configuration holds the path where the log files are to be created. # This path configured should be relative to the root path that is configured as CT_WORK_FOLDER_PATH in implementation property file. log.path=/logs # The below configuration is for controlling the logging level. # Possible values are - debug, error, info, fatal, warn, off. Default if not provided is "debug" log.level=${env.logLevel} ############################################################################## # The log.level is set as the default log level for all modules within Canvas. In case you want to override at # individual module level, then you can use the below options to override the same. # Module name Canvas Module # ------------ ----------------------------------- # audit Audit handling module # alert Alert handling module # session Session management layers # web Web layer modules # config Configuration module # cache Cache framework # security Security module # database Database module # entitlement Entitlement module # event Event definition & handling module # export Export framework # vdf Meta data frameworks # hal Host Access Layer # report Reporting module # validator Validation module # scheduler Scheduler module ############################################################################## log.level.audit=${env.logLevelAudit} log.level.alert=${env.logLevelAlert} log.level.session=${env.logLevelSession} log.level.web=${env.logLevelWeb} log.level.config=${env.logLevelConfig} log.level.cache=${env.logLevelCache} log.level.security=${env.logLevelSecurity} log.level.database=${env.logLevelDatabase} log.level.entitlement=${env.logLevelEntitlement} log.level.event=${env.logLevelEvent} log.level.export=${env.logLevelExport} log.level.vdf=${env.logLevelVdf} log.level.hal=${env.logLevelHal} log.level.report=${env.logLevelReport} log.level.validator=${env.logLevelValidator} log.level.scheduler=${env.logLevelScheduler} log.level.reqmodel=${env.logLevelReqmodel} ############################################################################## # Canvas uses Log4J as the internal logging library and uses a RollingFileAppender for handling logging. # The following set of configuration apply for how the logging is handled. # It should be noted the below configuration are optional. The default values if not provided is also # indicated against each configuration. # The following attribute 'rolloverModel' allows to choose any of the 2 models supported by Canvas Log appender namely: # A. CREATENEW - Current logging would happen in the file name having the current date pattern # and the highest rolling index value. (i.e., logging would happen by creating a new file) # B. BACKUPOLD - Current logging would always happen in file name without date pattern and # rolling index, on roll over the current file would be made as a backup with a date pattern and # index included in it. # The default used is BACKUPOLD rollovermodel = BACKUPOLD # The following attribute 'datepattern' decides on the following 2 aspects: # A. the period when the rollover should happen (i.e.) daily, monthly, yearly etc. # For example: # yyyy-MM >> Roll over at the beginning of each month # yyyy-ww >> Roll over at the first day of each week. The first day of the week depends on the locale. # yyyy-MM-dd >> Roll over at midnight each day. # yyyy-MM-dd-a >> Roll over at midnight and midday of each day. # yyyy-MM-dd-HH >> Roll over at the top of every hour. # yyyy-MM-dd-HH-mm >> Roll over at the beginning of every minute. # B. The Date format to be displayed in the log file name generated. # For Example: # ddMMMyyyy - generates log file name with date stamp in the file name as 20MAR2010 # yyyy-MM-dd - generates log file name with date stamp in the file name as 2010-03-20 # The default used is yyyy-MM-dd. datepattern = yyyy-MM-dd # The following attribute 'maxsizelimit' decides on the maximum file size of a log file # considering the rollover period. # For a period if the file size exceeds the set value a new file with same period would # be generated with rolling index incremented by one. # The appender expects size value in "KB", "MB" or "GB" # The default value is 10MB. maxsizelimit = 10MB # The appender expects the following two options: # 1. SUFFIX # 2. PREFIX # based on which the appender will create the log file name in the following format or pattern: # a. <filename><patternSeparator><datePattern><patternSeparator><rollingIndex>.<extension> if the suffixOrPrefix option is 'PREFIX' # Example: serverLogs-2010-03-26-01.log # b. <filename>.<extension><patternSeparator><datePattern><patternSeparator><rollingIndex> if the suffixOrPrefix option is 'SUFFIX' # Example: serverLogs.log-2010-03-26-01 # The default value is PREFIX. suffixorprefix = PREFIX # The appender expects any character except ':' that actually separates the date # pattern in the file name with other components of the file name. # The default value is - patternseparator = -