Loading TOC...
Administrator's Guide (PDF)

Administrator's Guide — Chapter 29

Log Files

This chapter describes the log files and includes the following sections:

For information on the audit log files, see Auditing Events.

Understanding the Log Levels

MarkLogic Server sends log messages to both the operating system log and the MarkLogic Server file log. Depending on how you configure your logging functions, both logs may or may not receive the equivalent number of messages. To enhance performance, the system log should receive fewer messages than the MarkLogic Server file log.

MarkLogic Server uses the following log settings, where Finest is the most verbose while Emergency is the least verbose:

Log Level Description
Finest Extremely detailed debug level messages.
Finer Very detailed debug level messages.
Fine Detailed debug level messages.
Debug Debug level messages.
Config Configuration messages.
Info Informational messages. This is the default setting.
Notice Normal but significant conditions.
Warning Warning conditions.
Error Error conditions.
Critical Critical conditions.
Alert Immediate action required.
Emergency System is unusable.

Log file settings are applied on a per-group basis.

By default, the system log for a group is set to Notice while the file log is set to Info. As such, the system log receives fewer log messages than the file log. You may change these settings to suit your needs. For example, if you are debugging a system problem, you may want to set the level to Debug to get more information. Keep in mind that log levels Debug and above degrade system performance significantly, so these log levels should not normally be used.

Configuring Log Files

To configure how log information is generated, perform the following steps:

  1. Click the Groups icon on the left tree menu.
  2. Click the group for which you want to configure the log file settings.
  3. Scroll down to the log settings, towards the bottom of the page.

    The following example shows the default log settings:

  4. Go to System Log Level and change the level if needed.
  5. Go to File Log Level and change the logging level of the MarkLogic Server private log file (ErrorLog.txt) if needed.
  6. Go to Rotate Log Files and select when MarkLogic Server should start a new private log file for this group.

    The following table describes each time frame:

    Time Frame Description
    Never The log file grows without bound.
    Daily A new log file is started every day at 12:00 A.M.
    Sunday A new log file is started every week on Sunday at 12:00 A.M.
    Saturday A new log file is started every week on Saturday at 12:00 A.M.
    Friday A new log file is started every week on Friday at 12:00 A.M.
    Thursday A new log file is started every week on Thursday at 12:00 A.M.
    Wednesday A new log file is started every week on Wednesday at 12:00 A.M.
    Tuesday A new log file is started every week on Tuesday at 12:00 A.M.
    Monday A new log file is started every week on Monday at 12:00 A.M.
    Monthly A new log file is started at 12:00 AM on the first day of each month.
  7. Go to Keep Log Files and enter the number of private log files to keep.

    The private log files are kept in an aging archive. After the number of log files grows to the value specified in the Keep Log File setting, when a new log file is started, the oldest log file archive is automatically deleted.

  8. Scroll to the top or bottom and click OK.

Viewing the System Log

The system log messages that MarkLogic Server generates are viewable using the standard system log viewing tools available for your platform. On Windows platforms, the seven levels of logging messages are collapsed into three broad categories and the system log messages are registered as MarkLogic. On UNIX platforms, the system logs use the LOG_DAEMON facility, which typically sends system log messages to a file such as /var/log/messages, although this can vary according to the configuration of your system.

Viewing the File Log

The private file log is maintained as a simple text file. You may view the current or any archived file log at any time using standard text file viewing tools. Additionally, you can access the log files from the Log tab on the main page of the Admin Interface.

The file is stored in the MarkLogic Server data directory for your platform. You may have overridden the default location for this directory at installation time. The following table lists the default location of the file logs on your platform:

Platform Private Log File
Microsoft Windows C:\Program Files\MarkLogic\Data\Logs\ErrorLog.txt
Red Hat Linux /var/opt/MarkLogic/Logs/ErrorLog.txt
Sun Solaris /var/opt/MARKlogic/Logs/ErrorLog.txt
Mac OS X ~/Library/Application Support/MarkLogic/Data/Logs/ErrorLog.txt

This file contains a set of log messages ordered chronologically. The number of messages depends on the system activity and on the log level that you set. For example, a file log set to Debug would contain many lines of messages whereas a file log set to Emergency would contain the minimum set of messages.

Any trace events are also written to the MarkLogic Server ErrorLog.txt file. Trace events are used to debug applications. You can enable and set trace events in the Admin Interface, on the Diagnostics page for a group. You can also generate your own trace events with the xdmp:trace function.

There must be sufficient disk space on the file system in which the log files reside. If there is no space left on the log file device, MarkLogic Server will abort. Additionally, if there is no disk space available for the log files, MarkLogic Server will fail to start.

Access Log Files

MarkLogic Server also produces access log files for each App Server. The access logs are in the NCSA combined log format, and show the requests made against each App Server. The access log files are in the same directory as the ErrorLog.txt logs, and have the port number encoded into their name. For example, the access log files for the Admin Interface is named 8001_AccessLog.txt. You may view the current or any archived file log at any time using standard text file viewing tools. Additionally, you can access the log files from the Log tab on the main page of the Admin Interface. Older versions of the access logs are aged from the system according to the settings configured at the group level, as described in Configuring Log Files.

« Previous chapter
Next chapter »