Jump to: navigation, search

Logging

iWD Manager and iWD Runtime Node support creation of their own log files for troubleshooting purposes. In addition, they both support centralized logging through Genesys Message Server (optional). The parameters needed for both types of logging are configured in the log4j.properties file for each application. The following procedures explains how to configure the required parameters.

Important
Write the pathnames using either a single forward ( / ) slash or a double backwards slash ( \\ ) as a separator.

Configuring Logging for iWD Manager

Prerequisites

  • iWD Manager is installed.
  • For centralized logging, Genesys Message Server is installed.

Refer to the Framework 8.1 Management Layer User’s Guide for more information about Message Server.

  1. Find the log4j.properties file webapps directory and open it in a text editor. The exact path is webapps/iwd_manager/WEB-INF/classes/log4j.properties for iWD Manager.
  2. For centralized logging, update the very first row of the log4j.properties file to include centralized_node at the end:
  3. log4j.rootLogger=INFO, runtime, centralized_node
  4. For centralized logging (optional), update the following parameters with the Message Server host and Message Server port, respectively:
  5. log4j.appender.centralized_manager.MessageServerHost=
    [ToBeChanged:MSG_SRV_HOST]

    log4j.appender.centralized_manager.MessageServerPort=
    [ToBeChanged:MSG_SRV_PORT]

  6. Update the following lines to include the name and dbid of your iWD Manager application (this is the application name that you must use to set up alarms in Solution Control Server):
  7. log4j.appender.centralized_node.MessageServerApplicationDBID=173
  8. Configure the parameter to specify the level of logging to send to Message Server:
  9. log4j.appender.centralized_node.Threshold=INFO
    Threshold can be set to any of the following values:
    • TRACE
    • DEBUG
    • INFO
    • WARN
    • ERROR
  10. For information about various settings for the root logger, refer to log4j framework docs, such as http://logging.apache.org/log4j/1.2/manual.html.
  11. You can change the directory where the logs will be written by changing the value of this line:
  12. og4j.appender.runtime.File=C:/GCTI/iWD/iwd_manager.log
    Important
    It is strongly recommended that you only set the file path to a directory on a local machine, not a remote location such as a shared network drive. Logging to a remote location can severely impact performance
  13. You can change the logging level by changing this line (sample is from an iWD Manager log4j.properties file):
  14. log4j.appender.manager.Threshold=INFO

    Possible values are Off, Warning, Error, Debug, Info, and Trace.

  15. You can change the maximum file size of the logs by changing this line:
  16. log4j.appender.manager.MaxFileSize=256MB
  17. Save your changes.
  18. The following is a sample iWD Managerlog4j.properties file configured for logging:

    info, rolling 256MB each (2 GB max)
    log4j.rootLogger=INFO, manager, centralized_node
    log4j.category.org.apache.myfaces.renderkit.html.util=ERROR
    log4j.category.org.hibernate.util.JDBCExceptionReporter=FATAL
    log4j.category.org.hibernate.event.def.AbstractFlushingEventListener=FATAL
    log4j.category.org.apache.commons.httpclient=ERROR
    log4j.category.org.apache.commons.digester=ERROR
    log4j.category.org.codehaus.xfire.transport.http.HttpChannel=FATAL
    log4j.category.org.codehaus.xfire.handler.DefaultFaultHandler=ERROR
    log4j.appender.manager=org.apache.log4j.RollingFileAppender
    log4j.appender.manager.Threshold=INFO
    log4j.appender.manager.File=C:/GCTI/iWD/iwd_manager.log
    log4j.appender.manager.layout=org.apache.log4j.PatternLayout
    log4j.appender.manager.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}|%t|%p|%c|%m%n
    log4j.appender.manager.MaxBackupIndex=7
    log4j.appender.manager.MaxFileSize=256MB
    

    If you enable centralized_node appender then make sure you change rootLogger to:

    log4j.rootLogger=INFO, manager, centralized_node
    log4j.appender.centralized_node=com.genesyslab.iwd.log.CentralizedAppender
    log4j.appender.centralized_node.Threshold=INFO
    log4j.appender.centralized_node.layout=org.apache.log4j.PatternLayout
    log4j.appender.centralized_node.layout.ConversionPattern=%m
    log4j.appender.centralized_node.MessageServerHost=MsgSrvrHost
    log4j.appender.centralized_node.MessageServerPort=4050
    log4j.appender.centralized_node.MessageServerClientName=iWD Manager
    log4j.appender.centralized_node.MessageServerApplicationDBID=173
    

Configuring Logging for iWD Runtime Node

The process of startup logging contains two stages:

  1. Initial Phase.
    1. When Data Mart starts, initial logging configuration is read from the yaml configuration file (<RUNTIMENODE_FOLDER>/config/iwd_dm.yaml).
    2. One log file will be created — <RUNTIMENODE_FOLDER>/datamart-startup.log.
  2. DataMart retrieves the configuration from Configuration Server.
    1. If logging configuration is missing in Configuration Server, Data Mart will exit with an error.
    2. If logging configuration is incorrect, Data Mart will exit with an error.
    3. If logging configuration is correct, Data Mart will reconfigure itself to log according to configuration stored in Configuration Server.
    4. All log files are created (see Log Files below).

For information about configuring IWD Runtime Node Logging, refer to the iWD Genesys Administrator Extension Plug-in Help.

Log Files

  • datamart.log—Main log.
  • datamart-startup.log—Initial phase log.
  • datamart-access.log - Data Mart API log.

Log files for corresponding Data Mart services:

  • aggregate-historical.log
  • aggregate-intraday.log
  • aggregate-stats.log
  • configuration-monitor.log
  • conf-server-connector.log
  • initialize.log
  • load-config.log
  • load-historical.log
  • load-intraday.log
  • maintain.log
  • stat-adapter.log

Hiding or Tagging Sensitive Data in Logs

Hiding All Sensitive Data

To hide all sensitive data in logs, you must create the following in the application options:

  • Section—[log-filter]
  • Option name—default-filter-type with the value set to hide.

Hiding Specific Data

To hide specific data (for example, password) in logs, you must create the following in the application options:

  • Section—[log-filter-data]
  • Option name—password with the value set to hide.

Common Settings

The settings described at the links below are common for most Genesys applications.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 19 December 2017, at 08:00.