About Error Logs About Log Rotation

7-4 Oracle Fusion Middleware Administrators Guide for Oracle HTTP Server

3. The following error log configuration tasks can be set from this page:

■ Configuring the Error Log Format and Location ■ Configuring the Error Log Level ■ Configuring Error Log Rotation Policy

7.2.1.1 Configuring the Error Log Format and Location

Oracle HTTP Server by default uses ODL-Text as the error log format and creates the log file with the name ohs_name.log under ORACLE_ INSTANCE diagnosticslogsOHS ohs_name directory. To use a different format or log location, do the following: 1. From the Log Configuration page, navigate to the General section under the Error Log section. 2. Select the desired file format. Although both ODL-Text and ODL-XML formats provide the same information, the ODL-XML file includes XML elements and wrappers, and so may be easier to read. ■ ODL-Text – the format of the diagnostic messages conform to an Oracle standard and are written in text format. ■ ODL-XML – the format of the diagnostic messages conform to an Oracle standard and are written in XML format. ■ Apache – the format of the diagnostic messages conform to the legacy Apache message format. 3. Enter a path for the error log in the Log FileDirectory field. This directory must exist before you enter it here.

4. Review the settings. If the settings are correct, click Apply to apply the changes. If

the settings are incorrect, or you decide to not apply the changes, click Revert to return to the original settings. 5. Restart Oracle HTTP Server. See Section 4.1.4 . Managing Oracle HTTP Server Logs 7-5

7.2.1.2 Configuring the Error Log Level

You can configure the amount and type of information written to log files by specifying the message type and level. Error log level for Oracle HTTP Server by default is configured to WARNING:32. To use a different error log level do the following:

1. From the Log Configuration page, navigate to the General section under the Error

Log section.

2. Select a level for the logging from the Level menu. The higher the log level, the

more information that is included in the log.

3. Review the settings. If the settings are correct, click Apply to apply the changes. If

the settings are incorrect, or you decide to not apply the changes, click Revert to return to the original settings.

4. Restart Oracle HTTP Server. See

Section 4.1.4 .

7.2.1.3 Configuring Error Log Rotation Policy

Log rotation policy for error logs can either be time-based, such as once a week, or sized-based, such as 120MB. By default, the error log file is rotated when it reaches 10 MB in size and a maximum of 7 error log files will be retained. To use a different rotation policy for error log file do, the following: 1. From the Log Configuration page, navigate to the General section under the Error Log section. 2. Select a rotation policy. ■ No Rotation – if you do not want to have the log file rotated ever. ■ Size Based – rotate the log file whenever it reaches a configured size. Set the maximum size for the log file in Maximum Log File Size MB field and the maximum number of error log files to retain in Maximum Files to Retain field. ■ Time Based – rotate the log file whenever configured time is reached. Set the start time, rotation frequency, and retention period.

3. Review the settings. If the settings are correct, click Apply to apply the changes. If

the settings are incorrect, or you decide to not apply the changes, click Revert to return to the original settings. 4. Restart Oracle HTTP Server. See Section 4.1.4 .

7.2.2 Using Fusion Middleware Control to Configure Access Logs

To configure an access log for Oracle HTTP Server using Fusion Middleware Control, do the following:

1. Navigate to the Oracle HTTP Server home page.

Note: The log levels are different for the Apache log format from ODL-Text and the ODL-XML log format. ■ For details on ODL log levels, refer to Setting the Level of Information Written to Log Files in the Oracle Fusion Middleware Administrators Guide. ■ For details on Apache log levels, refer to the LogLevel Directive in the Apache Server documentation.