dotCMS Log & Audit Logging - Documentation topics on: audit,audit logging,error handling,log files,logging,log manager,maintenance,.

dotCMS Log & Audit Logging

Tailing dotCMS Log Files

The most recent messages from the dotCMS log files may be displayed from the dotCMS backend. To tail the system Log Files, select System → Maintenance and click the Log Files tab.

This tab allows you to tail the logs without shell access to the dotCMS server. The following sections describe the purpose of each log file and the information tracked in each.

Note: The log file names and locations, and the information written to each log file, are defined in the log4j2.xml file, and may be changed. For more information please see the Logging Configuration documentation.

The Log Manager Tool

Clicking on Log Manager Tool pops up a window that allows webmasters to turn on / off the logging to dotcms-adminaudit.log, dotcms-security.log and dotcms-userActivity.log. To turn logging on/off, simply select the checkbox to the left of the desired log, and click the “Update System Logging” button.

The Log Manager Tool

Tailing Log Files in Different Locations

By default, the Log Files tab will only list log files contained in the default log file location (/dotserver/Tomcat-X.xx/webapps/ROOT/dotsecure/logs in the dotCMS installation). If you change the location where your log files are stored, or if you wish to be able to tail logs in other locations (such as your application server log files), you must update your configuration so dotCMS can find the log files in different locations.

Note: If you change the DYNAMIC_CONTENT_PATH property, the location of the log files will change, and the log files will no longer display in the Log Files tab. You must use one of the methods below or you will no longer be able to tail your logs from the Log Files tab.

There are two ways to specify where the Log Files tab looks for log files:

1. Set the TAIL_LOG_LOG_FOLDER Property

You may set the TAIL_LOG_LOG_FOLDER property to tell dotCMS where to look for log files. When this property is set, the Log Files tab will display all log files found in and below the specified folder.

For example, if you set this property to the root of your dotCMS installation, the Log Files tab will include all log files in and below the dotCMS root folder, which will include:

  • Your currently active dotCMS log files
  • Older (rolled) versions of your dotCMS log files
  • Your Tomcat application server log files
  • Any other files anywhere in the dotCMS folder tree that end in a .log extension

If your log files are not stored in the default location, you can create a symbolic link from the default location (/dotserver/Tomcat-X.xx/webapps/ROOT/dotsecure/logs) to the location where your log files are stored.

Note: This approach allows you to update the log file location without re-deploying plugins and restarting the dotCMS server. However it requires a manual change to the dotCMS file tree (which must be recreated manually any time dotCMS is updated), so it is not recommended for most installations.

Example: If you change the DYNAMIC_CONTENT_PATH property to /opt/dotcms/dotsecure, your log files will now be located in /opt/dotcms/dotsecure/logs. Run the following Linux command to add the symbolic link:

ln -s /opt/dotcms/dotsecure/logs $DOTCMS_HOME/dotserver/tomcat-8.0.18/webapps/ROOT/dotsecure/logs

For information on creating symbolic links in Windows, please see the Microsoft mklink documentation.

Log File Descriptions

Main Log File: dotCMS.log

The dotCMS.log file is the primary log file, used for tracking the successful initiation of backend actions and logging helpful warning and error messages. The dotCMS.log file is the most common log file viewed to monitor dotCMS status and look for information about potential issues.

dotCMS.log displayed in the Log Manager tab

Audit Log: dotcms-userActivity.log

The dotCMS User Activity log records the following information for all of the following changes to the system:

  1. Content Publishing
    • Start & end dates
    • User that made the modification
    • Content identifier
  2. Role Modifications
    • Type of action: creation, modification, deletion, enabling, or disabling
    • Date of modification
    • User that made the modification
    • Role identifier
  3. User Role Modifications
    • User that was modified
    • User that made the modification
    • Date of modification
    • Roles added or removed
  4. Scheduled Jobs
    • User starting/stopping the job
    • Date of modificaton
    • Job identifier
  5. Scheduled Job Modifications
    • Type of Action: creation, deletion, or modification
    • User that made the modification

Admin Audit Log: dotcms-adminaudit.log

For webmaster convenience, the admin audit log isolates logging of more sensitive operations concerning the creation and activation of dotcms data and processes. The log records the following information:

  • Date & time of operation
  • UserID or dotCMS class initiating the action
  • Verbose description of the action
  • Verbose description of the results of the action

Push Publishing Log: dotcms-pushpublish.log

Whenever a push publishing action takes place (an object is push published, a bundle is uploaded or downloaded, etc.), the push publish log records the following information:

  • Date and time of attempt
  • User performing the action
  • Bundle ID
  • Date & time of Push Publish start
  • Date & time of Push Publish end
  • Errors from failed Push Publish actions

Security Log: dotcms-security.log

The security log records the following information regarding all login activity by dotCMS users:

  • Date & time of user login/logout
  • UserID
  • IP Address of user

Site Search Log: dotcms-sitesearch.log

This log records errors and warnings related to Site Search indexing and features.

Velocity Log: dotcms-velocity.log

The velocity log displays helpful velocity error and information messages to help webmasters identify and correct problems in velocity code. The Velocity log records the following information:

  • URL of the request
  • Macro ID (if applicable)
  • Template used by the page request
  • Velocity stack trace

Access Log: dotcms_access.XXX-XX-XX.log

The Access Log is a daily log which records all access requests made to the dotCMS server. The log is titled and stored with the date in the title. The daily access log records the following:

  • IP Address making the request
  • Date and time
  • Request type
  • Request detail (url's, context, header info, etc.)

Test Log: dotcms-test.log

This log is used internally by dotCMS developers and QA specialists to log results of development test results. This log file is not intended for client usage.