OraLogMode Oracle Diagnostic Logging Directives

Managing Oracle HTTP Server Logs 7-9 For example: OraLogRotationParams T 43200:604800 2009-05-08T10:53:29 rotation_type This parameter can either be S for sized-based rotation or T for time-based rotation. rotation_policy When rotation_type is set to S sized-based, set the rotation_policy parameter to: maxFileSize:allFilesSize in MB For example, when configured as 10:70, the error log file is rotated whenever it reaches 10MB in size and a total of 70MB is allowed for all error log files a maximum of 7010=7 error log files will be retained. When rotation_type is set to T time-based, set the rotation_policy parameter to: frequencyin sec retentionTimein sec startTimein YYYY-MM-DDThh:mm:ss For example, when configured as 43200:604800 2009-05-08T10:53:29, the error log is rotated every 43200 seconds that is, 12 hours, rotated log files are retained for maximum of 604800 seconds 7 days starting from May 5, 2009 at 10:53:29.

7.3.2 Apache Log Directives

Although Oracle HTTP Server uses ODL by default for error logs, you can configure the OraLogMode directive to Apache to generate error log messages in the legacy Apache message format. The following directives are discussed in this section: ■ ErrorLog ■ LogLevel ■ LogFormat ■ CustomLog

7.3.2.1 ErrorLog

The ErrorLog directive sets the name of the file where the server logs any errors it encounters. If the file-path is not absolute then it is assumed to be relative to the ServerRoot. This directive is used only when OraLogMode is set to Apache. When OraLogMode is set to either ODL-Text or ODL-XML, ErrorLog is ignored and OraLogDir is used instead.

7.3.2.2 LogLevel

The LogLevel directive adjusts the verbosity of the messages recorded in the error logs. This directive is used only when OraLogMode is set to Apache. When OraLogMode is set to either ODL-Text or ODL-XML, LogLevel is ignored and OraLogSeverity is used instead. See Also: Refer to the Apache documentation for information about the ErrorLog directive. 7-10 Oracle Fusion Middleware Administrators Guide for Oracle HTTP Server

7.3.2.3 LogFormat

The LogFormat directive specifies the format of the access log file. By default, Oracle HTTP Server comes with the following four access log formats defined: LogFormat h l u t \r\ s b common LogFormat h l u t \r\ s b \{Referer}i\ \{User-Agent}i\ combined LogFormat {Referer}i - U referer LogFormat {User-agent}i agent

7.3.2.4 CustomLog

The CustomLog directive is used to log requests to the server. A log format is specified and the logging can optionally be made conditional on request characteristics using environment variables. By default, the access log file is configured to use the common log format.

7.4 Viewing Oracle HTTP Server Logs

You can search, view, and list Oracle HTTP Server log files using Fusion Middleware Control, or you can download a log file to your local client and view the log files using another tool. You can also use the text editor of your choice to view Oracle HTTP Server log files directly from the ORACLE_INSTANCE directory. By default, Oracle HTTP Server log files for are located in the ORACLE_INSTANCEdiagnosticslogsOHSohs_ name directory. As discussed in Section 7.1, Introducing Server Logs , there are mainly two types of log files for Oracle HTTP Server: error logs and access logs. The error log file is an important source of information for maintaining a well-performing server. The error log records all of the information about problem situations so that the system administrator can easily diagnose and fix the problems. The access log file contains basic information about every HTTP transaction that the server handles. This information can be used to generate statistical reports about the servers usage patterns. See Also: Refer to the Apache documentation for information about the LogLevel directive. See Also: Refer to the Apache documentation for information about the LogFormat directive. See Also: Refer to the Apache documentation for information about the CustomLog directive. See Also: For information about searching and viewing log files, see Oracle Fusion Middleware Administrators Guide