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 helps you manage your log categories and trace locations.

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

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> / <instance number>   log configuration  .

    Recommendation Recommendation

    We recommend that you make your log configurations on instance level.

    End of the recommendation.
  2. Select the categories or locations tab to create a new category or location, respectively. The new element is added as a sub-node inside the Root Category or 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 and then enter a name for the new log 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.
  4. Choose OK.

    The new controller is added to the tree.

Editing a Controller
  1. Select the controller you want to edit.

  2. In Severity dropdown box, choose 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 subnodes under the root one.

    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

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 delete and choose Remove

  2. Choose Apply Changes (Apply Changes).

    Note Note

    You can remove only log controllers created by you.

    End of the note.