Editing Log Settings

The Administration Server log files record data about the server, including the types of errors encountered and information about server access. Viewing these logs allows you to monitor server activity and troubleshoot problems by providing data like the type of error encountered and the time certain files were accessed.

Types of Log

The log type can be broadly classified as:

  1. Access Log -- The access log records information about requests to and responses from the server.

  2. Server Log -- The server log lists all the errors the server has encountered since the log file was created. It also contains informational messages about the server, such as when the server was started and who tried unsuccessfully to log in to the server.

Configuring Log Settings

For enabling and editing log settings for a configuration, perform the following tasks:

  1. Click Configuration tab

  2. Select the configuration for which you need to enable/edit log settings.

  3. Click General Settings > Log Preferences tab

Editing Access Log Preferences

The fields in the Access Log Preferences section are described in the following table:

Table 20 Field Description > Access Log Preferences

Field

Description

Enable

Enabled/Disabled. By default, access log is disabled. Select this option to enable access log. Note that enabling access log will degrade server performance at low magnitude.

Access Log Location

The server path, where the access log files will be stored. Default values is ../logs/access

Access Log Format

  1. Use Common Log Format -- This option is the default format type for the log file. The server will log most relevant information extracted from the request headers. Common log format is IP Address - user [date] "request" status content-length

  2. Log these details only -- You can log only specific values from the request header using this option. For example, you can log only the Client Username and the HTTP Status.

    Select the options provided in this page to include in the log report.

    You can also manually configure the log format using the Custom Log Format option.

Editing Server Log Preferences

The fields in the Server Log Preferences section are described in the following table:

Table 21 Field Description > Server Log Preferences

Field

Description

Server Log Location

The server path, where the Server log files will be stored. The default value is ../logs/errors

Log Verbosity Level

This option provides you with an elegant way of setting log granularity. For testing and debugging web applications, the recommended level is finest.

For production environment, the recommended log level is failure or security. catastrophe log level will log very few details.

Log Virtual Server Name

If this option is selected, along with the errors, the name of the virtual server processing the request is also logged.

Log application data written to stderr

If this option is selected, exceptions arising from deployed web applications are logged, if they are written to stderr.

This option is enabled by default.

Log application data written to console

If this option is selected, exceptions arising from deployed web applications are logged, if they are written to console.

This option is enabled by default.

Date Format

The time format, which will be used to append time stamps to the error messages. The default value is [%d/%b/%Y:%H:%M:%S]

Archiving Log Files

You can set up your log files to be automatically archived. At a certain time, or after a specified interval, the server rotates your access logs. The server saves the old log files and marks the saved file with a name that includes the date and time they were saved.

For example, you can set up your files to rotate every hour, and the server saves and names the file "access.199907.0152400," where "name|year|month|day|24-hour time" is concatenated together into a single character string. The exact format of the access log archive file varies depending upon which type of log rotation you set up.

Access log rotation is initialized at server startup. If rotation is turned on, the server creates a time-stamped access log file and rotation starts at server startup.

Once the rotation starts, the server creates a new time stamped access log file when there is a request that needs to be logged to the access log file and it occurs after the previously-scheduled "next rotate time."

Setting Log Rotation

Click the Rotate Logs Now button to archive log files immediately. The log is rotated and saved in the following format,<original-filename>.<YYYY.MM.DD.HHMM>.

You can also create a schedule for Server/access log rotation for the configured instances by using the log rotation option. For setting up log rotation, perform the following steps:

  1. Click Configuration tab

  2. Select the configuration for which you need to enable/edit log settings.

  3. Click General Settings > Log Preferences tab

  4. Click New button under Log Archiving Section

Archive Command:You can specify the absolute path of the command after the server rotates the log file. The post-rotation filename of the log file is passed as an argument to the archive command. Archive command also compresses the log file that has been rotated.

The fields in the new log rotation page is described in the following section:

Table 22 Field Description > Setting Log Rotation

Field

Description

Event

Access Log Rotation / Server Log Rotation. Select any or both of these options to configure rotation for that log type.

Time

The configured time when the event will start. Select the hour and minutes value from the drop down box.

Every Day -- Starts the event specified every day at the specified time.

Specific Days -- Starts the event specified at specific days.

1. Days -- Specify any day from Sunday to Saturday.

2. Dates -- Specify any day of the month from 1 to 31 as comma separated entries. For example, 4,23,9

Specific Months -- Starts the event specified at the specific time and month. Specify month from January to December.

Interval

Start the specified event after this time period.

1. Every Hours -- Select the number of hours from the drop down box.

2. Every Seconds -- Select the number of seconds from the drop down box.

If you want to delete the scheduled log rotation, Click Delete button in the Log Archiving section.