Adding, Editing and Removing Log
Destinations
This procedure describes how you manage the destination where the messages are written to. The log destination is also the object to which you specify and assign a formatter for the log, as well as multiple filters.
For more
information about log destinations, see
Log
(Destination).
Start the J2EE Engine Visual Administrator by double-clicking the script file go in <SAP_install_dir>/<system_name>/<instance_name>/j2ee/admin directory.
...
1. Choose Log Configurator Service → Runtime → Destinations tab.
Then, choose
To advanced mode.
2. Choose New.
The New destination dialog box appears.
...
a. In the Name field specify the name of the new destination.
b. Choose the Type dropdown list and specify the desired destination type.
You can to specify your own type, or select a default one: FileLog or ConsoleLog.
If you select a ConsoleType, you do not need to specify Pattern, Maximum File Size, and Number Of Files – these fields will be disabled.
c. In the Pattern field, specify the path to the file where messages will be written.
d. In the Maximum File Size, specify the maximum number of bytes each file piece of the rotating file-set can contain.
e. In the Number Of Files, specify the maximum number of file pieces in the rotating file-set for this destination.
If it is N/A, only one file is used. If a number is specified, when the size of the first file reaches the limit specified in the Maximum File Size field, the system starts to write in the second one. This procedure is executed until all specified files are full, then the system starts to write again in the first file, that is, overwrites the first one.
f. Choose OK.
The new destination appears in the Log Destinations pane.
3. In the Encoding field, specify a desired character encoding for this destination.
...
1. From the Log Destinations pane, select the destination you want to edit.
2. Choose the Severity dropdown box to specify a severity level. For more information, see Log Severities.
3. In case your destination is of type File (FileLog), you can decide to specify whether there will only be one file, or a rotating number of files. In the last case, use Count field to specify the number of files in a rotation stack, and the Limit field, to define in bytes the size of one file from the rotation stack.
4.
In the Filters pane, add filters to this destination. A filter can be
added to the log destination to restrict or alter the output behavior further.
For more information about filters, see
Filter
in the SAP Logging API
tutorial.
...
a. Choose Add. A dialog box appears.
b. In the New Filters field specify the type of the new filter (the full name of the Java class representing the particular filter).

You may only add an existing filter. Otherwise when you save the destination, the filter will not be loaded.
c. Choose OK.
The new filter is added. Additional options are provided for editing the filter’s name, or removing a filter.
5. In the Formatter pane, add a new formatter. That is the format in which the log destination will print the messages.
More
information:
Formatter

Each log destination has only one formatter associated. In case such formatter is not explicitly given, a default one is used. Therefore, you can add only one formatter to the selected destination.
...
a. Choose Add.
In the dialog box you can add the formatter that is already created, or specify an anonymous one.
b. Select the required formatter from the list and choose Select.
The selected formatter is added. Additional options are provided for removing, editing, and describing the formatter.

If the formatter is an anonymous one, selecting the Edit option, a dialog box appears with the options to change the formatter type.
In case the formatter is selected from the list of available formatters, selecting the Edit option is selected, it opens the Log Formatters tab where you can manage the properties of the formatter. For more information, see Adding, Editing, and Removing Log Formatters.
6.
Choose
Apply.
...
1. From the Log Destinations pane, select the destination you want to remove.
2. Choose Remove.
3.
Choose
Apply.