Defining Journal-Logging Settings
You can define the common or shared journal-logging targets that you want to make available to Optimize (or its logical servers) in the environment. Each journal-logging target represents a file that can receive and store logging data of a specified type from webMethods components in the environment. By default an Analytic Engine logical server uses the Journal Logging settings defined for the Default Settings configuration on the Configure Servers tab. If you want to use custom settings for an Analytic Engine, clear the Use Default check box and the complete Journal Logging settings will be displayed in an editable form.
When you configure journal-logging settings for a component, you set the logging level, or threshold, and assign targets to journal loggers. Each logger receives log events from application source code and forwards those log events to all targets that are assigned to the logger as well as to all targets that are assigned to its ancestor loggers. The logger determines whether to forward each event by comparing the event's level to the logger's threshold.
To define journal-logging settings
1. Under the Analytic Engine node in the configuration tree (on the Configure Servers tab), click Journal Logging.
2. Un-check the Use Default check box to display the Journal Logging settings in an editable format.
3. In the Journal Loggers for Environment Default Setting panel, define the threshold level for the root journal logger in the journal-logging configuration area.
Threshold levels indicate the level of information that you want to log to a specified target. If a journal logger is not assigned a threshold level, that logger inherits the assigned level from the root logger. The seven predefined threshold levels are listed below in order of decreasing importance:
Fatal
Error
Warn
Info
Debug
Trace
None, or off
With the exception of None (off), you can assign one of these predefined threshold levels for each target. The journal logger logs messages that are of the specified threshold level and also logs messages that exceed the specified threshold level. For example, if you specify the threshold level as Warn, the logger will log Warn, Error, and Fatal messages.
Note:
The available predefined threshold levels are determined at the product level.
4. If necessary, edit any target in the Target Name list by clicking the name of the target.
In the Add/Edit Target area, you can change the name, description, and threshold level for that target. (For more information about threshold levels, see the preceding step.)
5. If you edit a target that is written to a file, you also can specify various rollover details related to the log file. Do one of the following:
To change any of these rollover details, review the following several steps.
To leave all of the rollover details as is, proceed to step 10.
6. In the File field (in the Add/Edit Target area on the Configure Servers tab), enter the name of the file to which you want the logging data to be written.
7. Use the Rollover file by field to indicate how often you want to close the log file and open a new log file. Choose a rollover method from the following three options:
Time Period only Note:
All times are calculated according to the logical server's local time zone.
File Size only If you choose File Size only, complete the Max File Size field by entering the size at which you want the log file to be rolled over. The file will always be rolled over at midnight in the logical server's local time zone, but if the file reaches the specified maximum file size before midnight, the file will be rolled over at that point as well. The Max File Size field requires a specific format of the input that must include both the number and the unit of measure (KB, MB, or GB). For example, to set the Max File Size to 10 MB, type 10MB.
Size or Period If you choose Size or Period, complete both the Period field (see the next step for more information) and the Max File Size field (see the previous bullet for more information).
8. If you specify log file rollover by time period, you must also complete the Period field.
When you specify log file rollover by time period, each new log file is saved and named with the current date and time using ISO 8601 format (yyyy-mm-ww-dd-hh:mm:ss,sss). The option specified in the Period field determines which date/time characters are appended to each log file name (see the following table for more information). All times are calculated according to the logical server's local time zone.
If more than one log file is rolled over in a 24-hour period, the file names also will include a sequential marker, beginning with the characters -1, after the date/time characters. So, for example, the first log file rolled over in a 24-hour period would simply be named with the current date and time, using the format yyyy-mm-ww-dd-hh:mm:ss,sss. If a second log file is rolled over within that same 24-hour period, the characters -1 would be added to the second file name after the date/time characters. If a third log file is rolled over within that same 24-hour period, the characters -2 would be added at the end of the third file name, and so on.
Select from the options for the Period field.
The following table provides information about the options for the Period field.
Field | Description | Date/Time Characters Appended to Log File Name |
Midnight | Creates a new log file at midnight. Entries are added to that log file up until midnight of the next day. | yyyy-mm-dd |
Minute | Creates a new log file every minute. | yyyy-mm-dd-hh:mm |
Hourly | Creates a new log file every hour. | yyyy-mm-dd-hh, where hh uses a 24-hour clock |
Half Daily | Creates a new log file at noon and then again at midnight. | yyyy-mm-dd-{AM|PM} |
Weekly | Creates a new log file each Sunday at midnight. | yyyy-ww |
Monthly | Creates a new log file on the last day of each month at midnight. | yyyy-mm |
9. In the Max # Log Files field, specify the maximum number of log files that you want to be retained.
10. In the Rollover Destination field, specify the directory where rolled over log files should be stored.
If you choose Directory as your rollover destination, complete the additional fields that are described in the following table.
Field | Description |
Log Directory | Enter the name of the directory where the rollover log files will be saved. |
Host Name | By default, this field displays the name of the host for the current target. Change the host name if needed. |
Date Format | This field shows the date format that will be used for rolled over log files. No editing is needed. |
Time Format | This field shows the time format that will be used for rolled over log files. No editing is needed. |
11. When you are satisfied with the configuration of each target, click Save in the Add/Edit Target area to save the configurations, or click Cancel to discard any changes you have made.
After the targets are defined and deployed using the My webMethods Define Environments page, journal logging can be further configured in the webMethods components that use journal logging.