Inspecting Log Files in Redwood Platform

on-site-related topic

When you encounter issues with Redwood Server, the logs of the application server are always a great source of information.

Redwood Platform stores its log files in <installation_directory>/j2ee/cluster/server1/logs as several files:

  • db-init.log - the database initialization log, this is helpful for issues arising on newly installed systems or systems that have recently been upgraded.
  • scheduler.log - the server log, this log should contain information on issues that occurred after the start of Redwood Platform.
  • tomcat.log - the Redwood Platform console log, this log should contain startup information and any severe errors that occur in Redwood Server.

If you are on UNIX, you can use tail -f on the log files to get real-time information.

If you are on Windows, you can use advanced text editors or you might want to stop Redwood Platform service and restart it in "console" mode. To start Redwood Platform in "console" mode, you must run <installation_directory>\j2ee\cluster\server1\bin\start.cmd. You should increase the buffer size of the console.

Customizing Logging

The standard log4j2 configuration in <installation_directory>/j2ee/cluster/global/tomcat/log4j2/conf/log4j2.yaml should be suitable to most scenarios. If you wish to modify the settings for a short period, for example, you want to increase or decrease the verbosity levels for one or more components, you should create a backup of the log4j2.yaml file and make your changes. Do not forget to revert them back. Note that an upgrade will restore the defaults.

If you want to permanently change some settings, you copy the log4j2.yaml to another directory, make your changes, and use the log4j.configuration JVM argument to point to your log4j2.yaml file. If you use the shell scripts to start and stop Redwood Platform, you specify -Dlog4j.configuration=<path_to_log4j>/log4j2.yaml in the JAVA_OPTS environment variable (set in post stage) in <installation_directory>/j2ee/cluster/global/server1/bin/setvars.{sh,bat} ( sh for UNIX, bat for Windows). If you use the Windows service, open <installation_directory>\j2ee\cluster\global\tomcat\bin\Tomcat8w_64.exe //RS//<service_name> and specify -Dlog4j.configuration=<path_to_log4j>/log4j2.yaml at the end of the Java Options on the Java tab. This change requires a restart of Redwood Platform.

See log4j YAML form information.

Procedure

Increasing the buffer size of the console window

  1. Choose Properties from the title bar.
  2. On the Layout tab, enter 9999 into the Screen Buffer Size field.
  3. Choose OK and choose Apply properties to current window only and choose OK.

Note: If you do not want to perform this every time you start Redwood Platform in console mode, you can choose Save properties for future windows with the same title, but it might have effect on other Redwood Platform servers on that system.