Show TOC

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

 

Each log type can print messages in different formats: TraceFormatter, XMLFormatter, and ListFormatter. This procedure helps you manage the log formatters.

More information: Formatter

Note Note

You can configure and manage formatters for existing logs (destinations) only.

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 Formatter
  1. Choose   cluster   <template_name>/<instance_number>   log configuration   formatters  .

    Recommendation Recommendation

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

    End of the recommendation.
  2. Select any formatter from the tree and then choose New.

    A dialog box appears.

  3. Enter a name for the new log formatter and then choose OK.

    The new formatter appears in the Formatters tree.

Editing a Formatter
  1. From Formatters tree, select the formatter you want to edit.

  2. From Type dropdown box, choose the formatter type.

    The following are default ones:

    • ListFormatter – formats log records that can be transferred to and processed further by another application (for example, by Log Viewer).

    • TraceFormatter – formats log records in human readable format. You can specify a pattern to this format. If you do not specify such, the default one is created.

    • XMLFormatter – formats log records as XML elements.

  3. Choose Pattern field to configure the formatter.

    Note Note

    For TraceFormatter you can make configuration, using a custom formatting pattern. The pattern enables you to specify the message data fields, with placeholders of the form %[[-]<width>[-]]<type>.

    End of the note.
  4. Choose Apply Changes (Apply Changes).

Removing a Formatter
  1. From Formatters tree, select the formatter you want to delete and choose Remove.

  2. Choose Apply Changes (Apply Changes).

    Note Note

    You can remove only formatters created by you.

    End of the note.