Show TOC Start of Content Area

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

Use

This procedure describes how you manage the destination where the messages will be written using the SAP NetWeaver Developer Studio. The log destination is also the object to which you specify and assign an appropriate formatter for the log, as well as multiple optional filters.

Prerequisites

      An installed and running SAP NetWeaver Developer Studio.

      An already created EAR project. For more information, see Creating Enterprise Application Projects.

Procedure

...

       1.      In the J2EE Explorer tab, choose your EAR project.

       2.      From the context menu, choose New SAP logging configuration.

The log-configuration.xml appears in the project tree.

       3.      Choose the Log Destination tab from the right-hand pane.

Adding a New Destination

...

       1.      Select the Log Destinations folder.

       2.      Choose Add.

The new destination appears in the Log Destinations tree.

       3.      Choose the newly created log destination.

Several fields appear on the right of the Log Destination tab. Use them to specify the parameters of the new destination.

...

                            a.      In the Destination name, specify the name of the new destination.

                            b.      Use the Type dropdown box to specify the destination type:

                                                  i.       FileLog – directs log messages to a file.

                                                ii.       ConsoleLog – directs log messages to a console.

This graphic is explained in the accompanying text

If you select a ConsoleLog, you do not need to modify the Pattern, Limit, and Count fields.

                            c.      In the Pattern field, specify the path to the file where the logs will be written.

                            d.      In the Encoding field, specify the destination encoding.

                            e.      Use the Severity dropdown box to set the severity level for the new destination. For more information, see Appendix A: Severity Levels.

                              f.      In the Limit field, specify the size of the file where the logs will be generated.

                            g.      In the Count field, specify the number of log files for this destination.

If it is N/A, then only one file is used. If a number is specified, when the size of the first file reaches the limit specified in the Limit 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.

                            h.      In the Formatter pane add a formatter for this destination. You can either add an existing formatter, or create a new (Anonymous) one.

                                                  i.       Choose Without formatter if you prefer not to use formatters for this destination.

                                                ii.       Choose Formatter Reference if you want to use an already existing formatter.

The drop-down list below the Formatter Reference is activated, where you can select an existing formatter.

                                               iii.       Choose Anonymous Formatter if you want to create a new formatter for this destination.

The dropdown box below the Anonymous Formatter is activated, where you can select the type of the anonymous formatter: ListFormatter, TraceFormatter, XMLFormatter.

       4.      Choose Save.

Adding Filters to a Destination

You can add more than one filter to this destination:

...

       1.      Select the destination you have created.

       2.      Choose Add.

The new destination appears in a tree structure below the selected destination.

       3.      Select the newly created filter.

       4.      Specify the filter in the Log filter type filed on the right of the Log Destination tab.

       5.      Choose Save.

This graphic is explained in the accompanying text

To remove a filter from a specified destination, choose the filter you want to remove and choose Remove.

Editing a Destination

...

       1.      Select the destination you want to edit.

       2.      Modify the desired parameters using the fields in the right of the Log Destination tab.

       3.      Choose Save.

Removing a Destination

...

       1.      Select the destination you want to remove.

       2.      Choose Remove.

       3.      Choose Save.

 

End of Content Area