A.6 Logging Configuration File

You can configure common logging through the following files depending on the subsystem you want to modify.

Table A-2 Logging Configuration Files

Subsytem File
Database <OFSAAIInstalled Directory> / database/db_tools/log4j2.xml
Scenario Manager <OFSAAIInstalled Directory>/ behavior_detection/toolkit/ mantas_cfg/install.cfg
Behavior Detection <OFSAAI Installed Directory>/ behavior_detection/algorithms/MTS/ mantas_cfg/install.cfg
Administration Tools Web Server logs

$FIC_WEB_HOME/conf/RevLog4jConfig.xml

<root>

The following logger levels are available:

  • DEBUG
  • INFO
  • WARN
  • SEVERE
  • FATAL
AdministrationTools Application Server logs

$FIC_WEB_HOME/conf/RevLog4jConfig.xml

<root>

<priorityvalue ="debug" />

<appender-refref="ConsoleAppender1"/>

</root>

The following logger levels are available:

  • DEBUG
  • INFO
  • WARN
  • SEVERE
  • FATAL
Services <OFSAAI Installed Directory> / services/server/webapps/mantas/WEB- INF/log4j2.xml
IngestionManager

<OFSAAIInstalled Directory>/ingestion_manager/config/ log4j2_common.xml

The configuration file specifies enabling of priorities in a hierarchical fashion. For example, if Diagnostic priority is enabled, Notice, Warning, and Fatal are also enabled, but Trace is not.

In the configuration file, you can specify the following:
  • Locations of recorded log messages
  • Logging to the console, files, UNIX syslog, e-mail addresses, and the Microsoft Windows Event Viewer
  • Routing based on severity and/or category
  • Message library location
  • Maximum log file size

Sample Configuration File

The following is a sample logging configuration file. Make special note of the comments in the following sample as they contain constraints that relate to properties and logging.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<Appenders>
<RollingFile name="@@CATAGORY@@" append="true" filePattern="@@
PATH@@">
<FileName>@@PATH@@</FileName>
<PatternLayout>
<Pattern>[%d{E dd/M/yyyy hh:mm:ss}] [@@CATAGORY@@] [%5p] - %m%n</
Pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="10000kb"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingFile>
<Console name="stdout" target="
SYSTEM_OUT">
<PatternLayout>
<pattern>
[ %-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
</pattern>>
</PatternLayout>
</Console>
</Appenders>
<Loggers>
<Logger name="@@CATAGORY@@" level="info" additivity="false">
< A p p enderRef ref="@@CATAGORY@@"
level="trace"/>
<AppenderRef ref="stdout"
level="error"/>
</Logger>
<Root level="error">
<AppenderRef ref="stdout"/>
</Root>
</Loggers>
<!-- <root>
<priority value="##PRIORITY##"></priority>
</root> -->
</log4j:configuration>

Configurable Logging Properties

Table A-3 Configurable Parameters for Common Logging

Property Sample Value Description
log.format

<Pattern>[%d{Edd/M/yyyy hh:mm:ss}] [@@CATAGORY@@] [%5p] -

%m%n</Pattern>

Identifies the log formatting string. Refer to Apache Software’s Short Introduction to log4j guide (http://logging.apache.org/log4j/docs/ manual.html)for more details about the log message format.
log.message.library To be specified at installation. Identifies the full path and file name of the message library.
log.max.size

<Policies>

<SizeBasedTriggeringPolicy size=""10000kb""/>

</Policies>

Determines the maximum size (in kilobytes)of a log file before the system creates a new log file.
log.category.<catgory_name>.locati on - Contains routing information for message libraries for this category.
log.categories.file.path To be specified at installation. Identifies the full path to the categories.cfg file.
log.<category_name>.<severity>.lo cation - Contains routing information for message libraries with the given severity for the given category.
log4j.config.file To be specified at installation. Specifies the full path to the external log4j configuration file.
log.default.location - Contains routing information for message libraries for this category for which there is no location previously specified.
log.mantaslog.location - Contains routing information for message libraries for this category for which there is no location previously specified.
log.smtp.hostname - Identifies the hostname of the SMTP server if e-mail address is specified as log output.
log.fatal true Indicates that fatal logging is enabled; falseindicates that fatal logging is not enabled.
log.fatal.synchronous false

Indicates that fatal level logging should happen asynchronously; true indicates fatal level logging should happen synchronously.

Note: Setting value to true (synchronous)may have performance impact

log.warning true Indicates enabling of warning logging; falseindicates that warning logging is not enabled.
log.warning.synchronous false

Indicates that warning level logging should happen asynchronously; true indicates warning level logging should happen synchronously.

Note: Setting value to true (synchronous)may have performance impact

log.notice true Indicates enabling of notice logging; falseindicates that notice logging is not enabled.
log.notice.synchronous false

Indicates that notice level logging should happen asynchronously; true indicates notice level logging should happen synchronously.

Note: Setting value to true (synchronous)may have performance impact

log.diagnostic false Indicates that diagnostic logging is not enabled; true indicates enabling of diagnostic logging.
log.diagnostic.synchronous false

Indicates that diagnostic level logging should happen asynchronously; true indicates diagnostic level logging should happen synchronously.

Note: Setting value to true (synchronous)may have performance impact

log.trace false Indicates that trace logging is not enabled;trueindicates enabling of trace logging.
log.trace.synchronous true

Indicates that trace level logging should happen asynchronously; true indicates trace level logging should happen synchronously.

Note: Setting value to true (synchronous)may have performance impact

log.syslog.hostname hostname Indicates the host name of syslog for messages sent to syslog.
log.time.zone US/Eastern Indicates the time zone that is used when logging messages.

Monitoring Log Files

When using a tool to monitor a log file, use the message ID to search for a particular log message instead of text within the message itself. Under normal circumstances, the message IDs are not subject to change between Oracle releases, but the text of the message can change. If a message ID does change, you can refer to the appropriate readme.txt file for information about updated IDs.