5.14 Logging

Management and Security Server stores logs for the MSS microservices, webapps, and other components. The log files are saved in different locations and the properties are set using different configuration files.

Locate the logs of interest and follow the instructions for configuring the properties, as needed.

5.14.1 Locating MSS log files

The MSS log files are saved in these sub-directories of your installation location.

\MSS\server\logs\

This location contains log files for MSS microservices and several shared server components.

To configure one of these logs, use its specific service.yml file. See Edit service.yml.

  •  cassandra-sidecar\cassandra-sidecar.log
  •  metering\metering.log
  •  service-registry\service-registry.log
  •  cassandra.log
  •  container.log
  •  servletengine.log

NOTE: Some of these logs are helpful when troubleshooting Clustering issues. See Logs related to clustering.

\MSS\server\microservices\cassandra\logs\

  •  debug.log
  •  gc.log
  •  system.log

\MSS\MSSData\

The logs in these directories show information about users' session activity, system configuration activity, and basic trace logging.

  •  idm\log\ for Terminal ID Manager
  •       See the Terminal ID Management Guide to set logging and tracing.    
  •  log\   for the MSS Administrative Server
  •       See Configure Settings - Logging (below) to set log levels for these files.    

NOTE:The LogViewer can be used to view the legacy log files under mssdata\log\. The LogViewer enables you to set filters, search message text, and change defaults. On Windows, the Log Viewer is available from the Start menu. Click File > Load and select a specific log file, or drag-and-drop the desired log file into the LogViewer and it will load. For more information, see Using Log Viewer.

5.14.2 Configuring the MSS log files

Different configuration files are used to set log levels and other properties in the MSS log files. Follow the instructions for the files of interest.

Edit service.yml

Each microservice has its own service.yml file, which is used to configure logging and other properties for only that microservice. For instance, the service.yml for cassandra is in <install-dir>\MSS\server\microservices\cassandra\service.yml.

Use these guidelines for editing a service.yml file.

NOTE:When editing any service.yml file:

  • Lines in service.yml must be indented using spaces.

  • You must restart the server after any changes to service.yml.

Configure log rotation

Verify or edit the default values in service.yml. Note: name and value must be vertically aligned.

- name: LOGGING_FILE_MAXSIZE
  value: 10MB
- name: LOGGING_FILE_MAXHISTORY
  value: 10

Set logging levels

You can set the logging levels in service.yml to produce different types of information. Use the following format, being sure that name and value are vertically aligned.

- name: logging.level.<logger>
  value: "<log level>"

Where <logger> is the name of the logger to adjust and <log level> is one of the following:

  • Trace - designates finer-grained informational events than Debug

  • Debug - designates fine-grained informational events that are most useful to debug an application.

  • Info - designates informational messages that highlight the progress of the application at coarse-grained level.

  • Warn - designates potentially harmful situations.

  • Error - designates error events that might still allow the application to continue running.

  • Fatal - designates very severe error events that will presumably lead the application to terminate.

Remember to restart the server after making changes to service.yml.

Edit log4j2.xml

Located in <install-dir>\mss\server\conf\

Use log4j2.xml to configure the logging level for the overall service container and services shared among MSS components. You can set the logging level for each <logger>. See the list of values in Set logging levels.

For example, <Logger name="prefix" level="debug"/>

Edit logging.properties

Located in <install-dir>\mss\server\conf\

Use logging.properties to configure servletengine0.log, the servlet-engine component of MSS.

Configure Settings - Logging

In the MSS Administrative Console, open Configure Settings – Logging to set logging for users' session activity, system configuration activity, and basic trace logging.

Select logging levels for the log files located in \MSS\MSSData\logs.

Administrative Server

Set the level of logging for users' session activity and system configuration activity. You can configure the logs to

  • log errors and informational messages

  • log only errors

  • or, disable the log altogether

Location of logs: \MSS\MSSData\logs\awsaudit.0.log

Credential store (Reflection for the Web)

Set the level of logging for Credential Store activity. You can configure the logs to

  • log errors and informational messages

  • log only errors

  • or, disable the log altogether

Location of logs: \MSS\MSSData\logs\credentialaudit.0.log. You can also open Run Reports - Credential Store in the Administrative Console.

trace.log

When analyzing server problems, Customer Support may request that this setting be changed to include debug information. You cannot disable this logging option.

Set the level of logging for the trace log:

  • log errors, warnings, and informational messages (the default)

  • log errors, warnings, informational, and debug messages

  • log errors and warnings

Location of logs: \MSS\MSSData\logs\trace.0.log

NOTE:About Log Filenames. The log filename uses the naming convention logfile.<number>.log, where logfile.0.log is the current file, and previous log files are rolled over to names with numbers greater than zero, such as logfile.1.log.

To specify where the sequence number appears in the filename, edit the log.properties file by adding the %g token in the filename, such as logfile.%g.log.

Customizing the logging properties

You can customize the properties logged in trace.log by editing the log.properties file in MSSData\properties.

For example, use template_log.properties to customize logging properties.

  1. In the MSSData\properties directory, open the template_log.properties file.

    The template shows examples of the options that can be changed in log.properties.

  2. Use the template file as a reference. (See the commented section.) Or, copy and paste its contents into the log.properties file and modify as needed.

  3. When the changes are complete, save the file as log.properties.

  4. Restart the MSS Server service for the changes to take effect.

Similarly the you can customize the log files for the Terminal ID Manager. Go to mssdata\idm\properties\ and edit template_log.properties.

See the technical reference, Using Log Viewer, for more information about customizing and view the log data.

Write client debug output to console

Do not enable this setting unless requested to do so by Customer Support.

When enabled, all subsequent launches of Management and Security Server will send debug information to the console.

Mark Log

Each time the MARK LOG button is clicked, a searchable (LOG_MARK) message is written to the trace log files on all Administrative Servers—when those servers are clustered. A time-stamped confirmation appears.

To locate the lines in the LogViewer, search for LOG_MARK.

Collect Logs

Click the COLLECT LOGS button to initiate a local download of the MSS logs, MSS data, and configuration files. Use the prompt to Save or Open a zip file that contains the captured logs and configuration data.

This zip file can then be shared with Micro Focus Customer Support for troubleshooting purposes.

NOTE: Sensitive items such as certificates, keystores, and keychain files are excluded from the zip file.