Show TOC

Procedure documentationAdding, Editing and Removing Log Controllers Locate this document in the navigation structure

 

Log controller is a Java object that manages the writing of log and trace messages.

Two types of controllers are available:

  • Location - describes messages that originate from 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 Note

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

End of the note.

Note Note

These tasks have to be done with extreme caution and only by users experienced in the SAP Logging API.

More information: SAP Logging API

End of the note.

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_name>   log configuration  .

  2. Select the categories or locations tab if you want to create a new category or location, respectively. The new element is added as a sub-node inside the ROOT CATEGORY/ROOT LOCATION tree structure.

    To add a new category/location in a particular position inside the tree structure, browse to that position and select the node under which the new category/location will be inserted. Then, continue with the next step.

  3. Choose New.

    A dialog box appears.

  4. 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 Note

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

    End of the note.
  5. 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.

    Note Note

    If you change the severity of the root node or of a particular sub-tree, the change takes effect to all nodes below this root node.

    End of the note.
  3. You can specify a destination where the log/trace messages to be written. To add one or more destinations, choose Add.

    Select a destination and then chooseOK.

  4. To remove a destination, choose Remove.

  5. Choose Apply Changes (Apply Changes).

  6. To return the original configuration from the AS Java installation, choose Reset to Inherited Configuration.

    Note Note

    This is valid for the current controller and generally, only the severity levels are reset.

    End of the note.

Note Note

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.

End of the note.
Removing a Controller
  1. Select the controller you want to remove.

  2. Choose Remove.

  3. Choose Apply Changes (Apply Changes).

    Note Note

    You can remove only log controllers created by you.

    End of the note.