1.     About Log Rotation

Log rotation is the process of generating new log files and adding a timestamp to older log files. This helps prevent a log file from growing too large. Log rotation can either be done when a log file gets to a certain size, after a certain time frame, or perhaps both (only available for the standalone reports server). Log rotation can also be configured to have old log files replaced with new log files after a certain amount of rotated log files are generated.

2.     WebLogic Servers for Forms and Reports

By default, the log rotation settings for the WebLogic servers are set to have an unlimited number of log files rotated. The logs are rotated after a log file gets to around 5000 KB.

To change the settings for log rotation, log into the WebLogic Administration Console.

1.       Go to Environment –> Servers

clip_image001[4]

2.       Click on a WebLogic server (such as WLS_FORMS)

clip_image003[4]

3.       Click “Lock & Edit” in the top-left corner

clip_image004[4]

4.       Select the Logging tab and the General subtab.

clip_image006[4]

5.       In the Rotation section, you will see the Rotation type. You can select if you want “By Size” or “By Time”.

a.       By Size – The Rotation file size parameter specifies (in KB) how big the file can get before the log file is rotated. The parameter “Rotation file size” specifies (in KB) how big a log file can get before it is rotated

b.      By Time – The Begin rotation time parameter specifies (in HH:MM of the day) when the log file is rotated. You may also specify a Rotation interval (in hours) for how often a log file is rotated

clip_image008[4]

6.       To limit the number of log files in the directory, select “Limit number of retained files” (unchecked by default).

7.       If you have selected to limit the number of retained files, you can specify in the “Files to retain” parameter how many files to retain in the file system before older log files get overwritten (7 is the default setting).

8.       Click “Save” to save changes

clip_image010[4]

9.       Repeat steps 2-8 for any other WebLogic servers you wish to configure

10.   Click “Activate Changes”

clip_image011[4]

NOTE: If the rotation type (size or time) is unchanged, but the other parameters are updated, no restarts of any WebLogic servers are required. However, if you change the rotation type from “By Size” to “By Time” or vice-versa, any affected WebLogic servers will need to be restarted.

3.     Oracle HTTP Server (OHS)

By default, the log rotation settings for OHS are size-based for up to 10 MB and to only retain 7 log files.

To update the settings, log into the Enterprise Manager for the Forms and Reports environment. Expand Web Tier and select “ohs1”. Once there, click the drop-down menu and go to Administration –> Log Configuration.

clip_image012[4]

The settings are configured in the Rotation Policy. You can either select:

·         No Rotation – No log rotation at all (OHS log files will continue to grow larger)

·         Size Based – Log rotation performed when a file size gets to the limit (Maximum Log File Size (MB))

o   Maximum Files to Retain – The maximum number of files to keep in the server before older log files are overwritten

·         Time Based – Log rotation performed starting at a specified day and time.

o   Rotation Frequency – How often the file is rotated

clip_image014[4]

To save changes, click “Apply”. NOTE: You will need to restart OHS either from Enterprise Manager or OPMN.

NOTE: If you try to access the log configuration for OHS and you get an error “Failed to invoke operation load on MBean”, please review our knowledge base article to update a parameter in admin.conf to fix this error: https://pitss.com/us/2013/10/18/unable-to-edit-ohs-configuration-files-in-enterprise-manager-for-forms-11-1-1-6-or-11gr2/

4.     Standalone Reports Server

By default, the log rotation settings for the standalone reports server is set to a “size based” log rotation policy where the maximum file size is 10 MB and all log files cannot be more than 100 MB.

Log into the Enterprise Manager for Forms and Reports. Expand Reports and select your standalone reports server name “RptSvr…”. Next, select the drop-down menu and go to Logs –> Log Configuration.

clip_image015[4]

Select the “Log Files” tab and you will see three handlers:

·         rwengine_trace_handler – Logs for the reports server engine(s)

·         rwserver_trace_handler – Logs for the standalone reports server itself

·         zrclient_trace_handler – Logs for the network connectivity for reports

To view the rotation policy, select a handler and select “Edit Configuration”.

clip_image017[4]

In the window that appears, you will see the rotation policy. You can either configure the rotation policy for size-based rotation, time-based rotation, or both:

·         Size Based

o   Maximum Log File Size (MB) – How large a single log file can get before rotating the log

o   Maximum Size of All Log Files (MB) – How large all of the log files total can get before old log files are overwritten

·         Time Based

o   Start Time – What day and time to start rotating logs

o   Frequency – How often to rotate log files (in minutes)

clip_image018[4]

To make any changes, click “OK”. Back in the main window, make any changes to the other handlers if needed and click “Apply” to activate the changes. NOTE: You will need to restart the standalone reports server either with Enterprise Manager or OPMN to deploy the changes.