Show TOC Start of Content Area

Procedure documentation Adding, Editing and Removing Log Controllers  Locate the document in its SAP Library structure

Use

Log controllers are the objects you call to write messages. To this end, log controllers provide you with methods for associating logs with them and for controlling the actual writing of messages. Two types of controllers are available:

      Location – describes messages that originate from delimited source code areas, and is used to emit trace messages.

      Category – describes messages specific to distinguished problem areas, and is used to emit log messages. Typical problem areas are databases, networking, security auditing, and others.

This procedure describes how you manage the categories and the locations using the Log Configuration function in the Config Tool.

Note

The configuration steps for both categories and locations are the same. Therefore the steps below are described for log controllers as a whole.

Caution

Adding, editing, and removing log controllers has to be done with extreme caution and only by users experienced in the SAP Logging API.

More information: SAP Logging API

Prerequisites

Start the Config Tool by double clicking the configtool script file in <SAP_install_dir>/<system_name>/<instance_name>/j2ee/configtool directory.

Procedure

Adding a New Controller

...

       1.      Choose cluster template Log Configuration

       2.      Select the Categories tab if you want to create a new category, or the Locations tab if you want a new location. The new element is added as a new sub-node of the ROOT CATEGORY / ROOT LOCATION tree structure. If you want to add a new category / location in a particular position inside an already available tree structure, browse to that position, select the node under which the new category/location will be added, and then continue with the next step.

       3.      Choose New.

A dialog box appears.

...

                            a.      In the Enter name field, enter the name of the new controller.

Categories are named according to the hierarchical structure known from file systems.  The different hierarchical levels in a category name must be separated by “/”, for example /System/Database (always starts with ‘/’).

Locations are labeled according to the hierarchical structure known from Java packages. The “.” character is used to demarcate the different layers in locations’ names. For example com.sap.yourPackage.Class.

Note

If you have selected a particular node, the Name field will display the path to the selected node. Therefore, you only have to define the sub-name of your category/location at the end.

                            b.      Choose OK.

The new controller is added to the tree.

Editing a Controller

       1.      Select the controller you want to edit.

       2.      In the Severity dropdown box, specify the level of severity.

More information: Appendix A: Severity Levels.

       3.      If you are changing the severity of the root node of the whole tree or of a particular sub-tree, the change will take effect to all nodes below this root node.

       4.      You can specify a destination where the log/trace messages to be written. To add one or more destinations, choose Add and then OK.

       5.      If you want to remove a destination, choose Remove (on the right-hand side).

       6.      Choose This graphic is explained in the accompanying text Apply.

Note

Choose the Reset to template option if you want to return to the configuration available at the time of the AS Java installation. This is valid for the current controller only and has some restrictions, that is, sometimes not all the configuration will be restored. Generally, only the severity levels are reset.

Recommendation

Trace messages for standard output for STDOUT and STDERR are written in the defaultTrace.trc file to the locations System.out and System.err, respectively. To be able to see these trace messages, you have to set the severity level of System.out to INFO , and the severity level of System.err to ERROR.

Removing a Controller

...

       1.      Select the controller you want to remove.

       2.      Choose Remove (at the bottom of the configuration window).

       3.      Choose This graphic is explained in the accompanying text Apply.

Note

For the changes to take effect, restart the cluster.

 

End of Content Area