Sunteți pe pagina 1din 24

Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Pinpoint Problems in Java-Based


Applications with Ease Using SAP
NetWeaver 04 Logging and Tracing:
A System Administrators Guide
Robert Heidasch

As an SAP system administrator, you know all too well how many hours,
and sometimes days, you can spend investigating system problems.
Perhaps a user transaction fails and loses important business data, or
a remote function call (RFC) in a critical program returns an error
message. Most of you are familiar with using the ABAP-based system
log or user log to identify the causes of such problems the database
is full or a network problem occurred, for example when they arise
in an ABAP-based application such as SAP R/3 or SAP Customer
Relationship Management (SAP CRM). But what do you do when a
Java-based application causes problems with the persistence layer, and
the user sees only a cryptic and unhelpful exception message in the
browser? What if the application is no longer responding? Or worse,
Robert Heidasch worked for what if the problem occurs with an application that integrates both ABAP
several years as an SAP R/3 and Java technologies in the same enterprise landscape?
consultant and project
To help you investigate problems in Java-based applications, this
manager in the Financials article introduces you to the Java logging and tracing functionality
and Logistics areas. He included with SAP NetWeaver 04. This logging and tracing architecture
joined SAP in 1999 and applies to all Java-based SAP NetWeaver components (services,
worked in the Logistics area interfaces, and libraries) and applications, including SAP Web
and on the integration of Application Server (SAP Web AS) 6.40, SAP Enterprise Portal
SAP software with Microsoft (SAP EP) 6.0, SAP Knowledge Management and Collaboration,1
and SAP Exchange Infrastructure (SAP XI) 3.0. To familiarize you
products using RFCs, BAPIs,
with this architecture, I begin with an overview of Java logging and
and Web services. Robert
currently works in the SAP 1
For those who are unfamiliar with these components, SAP Knowledge Management is an
NetWeaver Foundation SAP NetWeaver component that provides a content management system for SAP EP. The SAP
NetWeaver Collaboration component is closely integrated with SAP Knowledge Management
group. and provides asynchronous (e.g., Collaboration Rooms) and synchronous (e.g., instant messaging)
methods of communication.

(complete bio appears on page 52)

For site licenses and volume subscriptions, call 1-781-751-8799. 29


SAP Professional Journal March/April 2005

tracing concepts and how they apply to the SAP application-generated system problems. For these
NetWeaver 04 environment. I then show you how tasks, system integrators need detailed application-
to configure Java-based logging and tracing in your level information such as the user action context, pro-
own SAP NetWeaver environment using the tools gram call stack, and so on.
provided with the SAP NetWeaver platform. Finally,
I share some tips for identifying potential problems To address both perspectives effectively, the
in log files, and I conclude by presenting some special Java-based logging and tracing architecture in SAP
considerations for logging with SAP EP, a now widely NetWeaver provides separate log and trace files.
used component that requires a slightly different log- System administrators typically work with log files,
ging configuration. which contain messages about current system status,
errors, and key system events. System integrators typ-
ically work with trace files, which contain information
about the program flow and erroneous system or
application behavior.
Separate Logs and Traces Offer
Something for Everyone Ill next provide a brief overview of the specific
tools that make up the SAP NetWeaver logging and
In keeping with Java principles, the Java-based log- tracing architecture. Once you have a solid founda-
ging and tracing architecture in SAP NetWeaver is tional knowledge of these tools and how they work, I
designed to accommodate the needs of two disparate will then show you in detail how to use them in your
types of users system administrators and system own SAP NetWeaver environment.
integrators. Each group has inherently different inter-
ests and performs distinctly different tasks.

A system administrator focuses primarily on


managing and monitoring software systems, which
requires knowledge of the current state of an applica-
Overview of Java-Based Logging
tion, its availability, any problems that arise, and the and Tracing Administration
states of its components. Because systems and appli-
Delivered as part of the SAP NetWeaver platform,
cations are often complicated, system administrators
SAP Web AS integrates two different application
need to be able to perform a wide range of administra-
technologies ABAP and Java. To facilitate trou-
tive tasks in order to obtain the information they need.
bleshooting, the server architecture also provides
The Java-based logging and tracing architecture in
separate logging and tracing solutions for each
SAP NetWeaver supports these needs by establishing
technology.2
default administration areas for example, operating
system and hardware, database, network, user
management, and so on. For simplicity and ease of The traditional ABAP-based logging infrastruc-
use, each administration area has its own correspon- ture, which includes specialized logging-related trans-
ding log and trace files. actions (e.g., SLG0, SLG1, and SLG2) for defining
and reviewing application logs, is available only for
System integrators (application experts, consult-
ants, developers, etc.) are primarily responsible for 2
Although these solutions exist in parallel and are used separately,
system integration and component and application you can aggregate their logs and traces in the Computing Center
Management System (CCMS). For more information, go to the
development. System integrators are typically skilled SAP help portal (http://help.sap.com), and in the SAP NetWeaver
developers who have a deep understanding of one documentation, follow the menu path Application Platform Java
Technology in SAP Web Application Server Administration Manual
or more applications or functions and often work Server Administration Logging Monitoring the J2EE Log
closely with system administrators to resolve complex Files in the CCMS.

30 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 1 Tools for Administering Logs and Traces for Java-Based Applications

Visual Administrator

Log Manager Configure global logging


and tracing parameters

Log Configurator

Log Controller Log Controller Severity Configure characteristics


of individual logs and traces
Log Destination Log Formatter

Log Viewer View logs and traces

Figure 2 The Visual Administrator Initial Screen and Connection Dialog

ABAP-based SAP Web AS applications.3 The ABAP- Web AS for running Java applications). Figure 1 is an
based logging functionality is well-known to system overview of the different tools that make up the log-
administrators who have worked with ABAP-based ging and tracing infrastructure and enable you to work
SAP systems such as SAP R/3 or SAP CRM. with logs and traces for your Java-based applications.

Starting with Release 6.40, SAP Web AS pro- The SAP J2EE Engine Visual Administrator is
vides an independent logging and tracing infrastruc- the central access point for all the logging and
ture for Java-based applications as part of the SAP tracing tools. To start the Visual Administrator, run
J2EE Engine (the J2EE-compliant server within SAP its startup script (go.bat on Microsoft Windows sys-
tems; go on Unix systems), which is located in the
3
For more information on using the ABAP log, see the article An /usr/sap/<SID>/JC<InstNo>/j2ee/admin directory on
Integrated Approach to Troubleshooting Your ABAP Programs:
Using Standard SAP Investigative Tools for Production Problems
the server. In the connection dialog that appears with
(SAP Professional Journal, May/June 2004). the Visual Administrator initial screen (see Figure 2),

For site licenses and volume subscriptions, call 1-781-751-8799. 31


SAP Professional Journal March/April 2005

select the connection configuration for the SAP Finally, the Log Viewer enables you to examine
Web AS instance to which you want to connect, and Java-based logs and traces. It is an easy-to-use tool
click on the Connect button. The Default connection for analyzing system, application, and component
configuration (listed first in the connection dialog) log/trace messages to investigate the current system
connects to the current instance via the P4 port (the status, problems and errors, program flow, and so on.
port designated for SAP Web AS communication). The Log Viewer also offers helpful search and filter
Connecting to an instance other than the current functionality so you can view only the messages
instance requires an additional connection configura- generated by a particular application, for example,
tion (see the sidebar on the next page for more details). which significantly simplifies and speeds up prob-
As you can see in Figure 2, there are three connections lem analysis.
configured in addition to the default.
While the Log Viewer is designed to simplify log
Lets take a brief tour of the Visual Administrator and trace file viewing and navigation, a basic under-
logging tools outlined in Figure 1. As part of the standing of the Java-based SAP Web AS directory
SAP J2EE Engines Java Enterprise Runtime, which structure, and where to look for the physical log and
provides core system functions, the Log Manager trace files, can be a huge timesaver when you need to
manages the logging of system events. This tool drill down to investigate a problem. Well take a
enables you to configure basic, global characteristics quick look at this next, and then I will walk you
that will apply to all logs, such as whether system- through how to use the Visual Administrator tools in
critical logs are stored in the database, whether traces your own SAP NetWeaver environment.
are written to a single file, and so on.

The Log Configurator is an API for configuring


individual logging and tracing settings for all Java- Understanding Where Log and
based components and applications (both SAP-
supplied and custom-built). You configure the Trace Files Are Generated
settings by modifying the properties of the follow-
Depending on your needs (for example, the number of
ing objects:
users and running applications you have), you can
configure the Java-based SAP Web AS with one or
A log controller object is either a category more physical servers. The server software and the
(an SAP-supplied or custom-built object that physical server the software runs on are collectively
defines log functionality settings) or a location referred to as an instance. More physical servers
(an SAP-supplied or custom-built object that (instances) build a cluster. Each instance consists of
defines trace functionality settings). A controller one or more dispatchers that forward user requests to
can be set to a variety of severity levels, which the server (or servers). Dispatchers and servers are
define the type of messages included in the log referred to as nodes and are instances of the Java
or trace file for the category or location object, Virtual Machine (JVM).
respectively.
The number of SAP Web AS instances to install,
A log destination object specifies the location and the number of dispatchers and servers to run on
of the log or trace file for its associated each instance, depends entirely on your particular
controller object. needs and system resources. For example, one organi-
zation might install a single SAP Web AS instance on
A log formatter object defines the format of a single physical server and run only one dispatcher
the log or trace file for its associated controller node and one server node. But another organization
object. might install multiple SAP Web AS instances on many

32 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Establishing Connections to Additional SAP Web AS Instances

In order to connect to an SAP Web Application Server


(SAP Web AS) other than the current instance, you
must establish a connection to it in the Visual
Administrator. Once created, the connection appears
in the connection dialog presented each time you start
the Visual Administrator (see Figure 2).

To create a new connection, click on the New button


in the Visual Administrator connection dialog and
follow the connection wizard instructions. In the first
screen of the wizard (see the first screenshot to the
right), enter the name (p78884 in the example) that
you would like to appear in the connection dialog.
Then select the connection type (in this example,
Direct Connection To a Dispatcher Node) and click on
the Next button.

Next, enter the details for connecting to the instance,


as shown in the second screenshot to the right. First
make sure you have all of the necessary information
a user name with administrator rights, the host
name for the target SAP Web AS instance, and
the P4 port number for the target SAP Web AS
instance (P4 is the port designated for SAP Web AS
communication).

To determine the P4 port number for the target SAP


Web AS instance, open the batchconfig.log file in
the /usr/sap/<SID>/JC<InstNo>/j2ee directory on
the current instance. Search for the entry that
contains the string p4 port =, as shown in the
screenshot below.

For site licenses and volume subscriptions, call 1-781-751-8799. 33


SAP Professional Journal March/April 2005

physical servers, which build a cluster, and run many see in the Destinations frame of the Log Configurator
nodes on each physical server. The possible number in Figure 3, this category has two destinations
of nodes running in each instance also depends on the defined because you can start each server node with
physical server resources number of processors, or without using the system console. One destination
available memory, and so on. (system_server_console) is defined as a console log
(of type ConsoleLog). It is active only when the
In addition, each SAP Web AS node (dispatcher server is started with the system console for
or server) has its own home directory: example, only when the server is not started as a
Microsoft Windows service. The other destination
(system_server_log) is defined as a file log (of type
The dispatcher home directory (which Ill refer to
FileLog) and uses the pattern ./log/system/server.log,
as <dispatcher home> for simplicity) is /usr/sap/
which represents the physical file name in the server
<SID>/JC<InstNo>/j2ee/cluster/dispatcher<No>.
home directory. Therefore, all log messages for
the System/Server category appear in the log file
The server home directory (which Ill refer to <server home>/log/system/server.log.
as <server home> for simplicity) is /usr/sap/
<SID>/JC<InstNo>/j2ee/cluster/server<No>. Now lets investigate how to determine the
location of a trace file, which is a bit more compli-
Further, each dispatcher and server node also cated than locating a log file. Like a log file (as
has its own dedicated log directory nested within defined by its category), a trace file (as defined by
the home directory (<dispatcher home>/log and its location) can have its own log destination.
<server home>/log). For example, server 0 running However, the default configuration of the Java-based
on system E11 as instance 00 writes its log and trace SAP Web AS can override this setting depending on
files in the /usr/sap/E11/JC00/j2ee/cluster/server0/log the value (YES or NO) of the ForceSingleTraceFile
directory. As you can see, the number of file loca- property in the Log Manager. If the value of the
tions can easily increase exponentially with each ForceSingleTraceFile property is NO, SAP Web AS
additional SAP Web AS node, as can the number of uses the destination specified for that particular trace
nodes with each additional SAP Web AS instance, (the log destination configuration); if it is YES, it
so its important to know where to look for a particu- redirects all trace messages to a single trace file
lar file. defined by the DefaultTraceFile_Pattern property in
the Log Manager. By examining the Log Manager
Suppose you need to find the log or trace file for a properties, you can see that the default value of the
particular log controller. For example, perhaps you ForceSingleTraceFile property is YES, and the
need to investigate a user problem that occurred on default value of the DefaultTraceFile_Pattern
server A, node 0, in a particular application. Each log property is ./log/defaultTrace.trc. Thus, when
controller has at least one specified destination, with a SAP Web AS uses the default configuration, all
physical file name defined by the destination pattern. trace messages are written to the trace file
The log destination configuration can be either deliv- <server home>/log/defaultTrace.trc, regardless of
ered as part of its associated SAP Web AS service or whether the location has its own specified destination.
application or created manually by the system admin- In other words, the ForceSingleTraceFile parameter
istrator. So, to find the file in question, you would deactivates the use of any specific destinations for
use the Log Configurator (via the Visual Adminis- individual traces.
trator) to check the category/location and log
destination settings. You can disable the default single trace behav-
ior (that is, the creation of one trace file) for individ-
For example, lets consider a log file for the ual locations or for all locations. For example,
SAP-supplied System/Server category. As you can suppose you want to write all messages for a new

34 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 3 Multiple Log Destinations Defined in the System/Server Category

application you are developing to a separate file, As an example, all SAP-supplied locations
perhaps because you want to define a custom log for SAP EP 6.0 use the log destination
formatter for a specialized message format. To service_com.sap.portal.prt.sapj2ee_portalTrace by
turn off this behavior for one location, set the default. If you disable the single trace for all loca-
SingleTraceFile_UnrestrictedLocations property tions by setting the ForceSingleTraceFile property
in the Log Manager to the desired file location. to NO, SAP EP writes all trace messages to the file
To turn off this behavior for all locations, set the <server home>/log/applications/portal/portal.trc.
value of the ForceSingleTraceFile property in the
Log Manager to NO. The affected locations then Now that you have a solid understanding of where
use the specified log destination (instead of the default and how SAP Web AS generates log and trace files,
log destination) and write messages to the specified and how to locate them, I will show you how to use
trace file. each of the Visual Administrator tools and settings to

For site licenses and volume subscriptions, call 1-781-751-8799. 35


SAP Professional Journal March/April 2005

Figure 4 Changing Log Manager Properties Using the Config Tool

manage log and trace files in your own SAP properties for the Java-based components and appli-
NetWeaver environment, starting with the Log cations in your SAP NetWeaver environment. It
Manager.4 defines the severity level at which logs are stored in
the database, where they are stored (as described in
the previous section), how long they are stored, and
their maximum size, for example. You can specify
Working with the Log Manager these settings for all SAP Web AS nodes or for indi-
vidual nodes.
Configuring Global and Local
Logging and Tracing Properties The Java-based SAP Web AS provides two tools
for configuring the Log Manager properties as part of
The Log Manager defines basic logging and tracing the SAP J2EE Engine the Config Tool and the
Visual Administrator. The advantage of using the
4
For complete details on the Visual Administrator tools, go to the SAP Config Tool is that it is available at all times, whether
help portal at http://help.sap.com, and in the SAP NetWeaver documen- or not SAP Web AS is running it connects directly
tation, follow the menu path Application Platform Java Technology
in SAP Web Application Server Administration Manual Server to the database. To start the Config Tool, run the
Administration Logging. startup script (configtool.bat on Microsoft Windows

36 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 5 Changing Log Manager Properties Using the Visual Administrator

systems; configtool.sh on Unix systems), which is (when modifying a particular nodes configuration).
located in the /usr/sap/<SID>/JC<InstNo>/j2ee/ To activate your changes, you must restart the
configtool directory on the server. affected server.

To navigate to the Log Manager settings for When SAP Web AS is running, you have the
a particular server node, select cluster-data option to use the Visual Administrator tool to change
instance_ID<No> server_ID<No> managers the Log Manager properties. To navigate to the set-
LogManager in the Config Tool navigation pane tings for a local server node, select <SID> Server
(as shown in Figure 4). To navigate to the global <No> Kernel LogManager on the Cluster tab
settings, select cluster-data Global server in the Visual Administrator navigation pane (see
configuration managers LogManager. To Figure 5). To navigate to the global settings,
modify a property, select it in the Global properties select the Global Configuration tab in the Visual
frame (shown at the top of the right-hand pane in Administrator navigation pane and then select
Figure 4), enter a new value, and click on the Set Global Configuration Server Kernel
button to the right, which becomes active once you LogManager. To change a property, select the prop-
enter a value. The changed property then appears erty, enter a new value, and then click on the Update
in the Custom value column (when modifying the button at the bottom of the right-hand pane. When
global server configuration), or it appears in the you are finished, remember to restart SAP Web AS to
Local properties frame below the global properties activate your changes.

For site licenses and volume subscriptions, call 1-781-751-8799. 37


SAP Professional Journal March/April 2005

During startup, SAP Web AS initializes the log- you need to investigate problems on a production sys-
ging and tracing structure by reading the log configu- tem where you cant readily perform a restart.
ration files associated with the components and
applications. All SAP Web AS components (services, I will show you how to use the Log Configurator
interfaces, and libraries) and applications, both SAP- next, and I will also take a more detailed look at the
supplied and custom-built, deliver their initial logging log-configuration.xml file and how you can use the
and tracing configuration in a log-configuration.xml predefined log and trace hierarchy to streamline your
file (well look at this file in more detail in an upcom- log configuration.
ing section). Using these files, the entire logging and
tracing structure is initialized for all SAP Web AS
components and applications in a single operation. As
a result, SAP Web AS applications can share logging Working with the Log
and tracing objects, such as those delivered by SAP.
For example, SAP-supplied SAP Web AS components Configurator Setting Log
(such as the Portal Runtime service and SAP XI 3.0 and Trace Characteristics
adapters) and SAP Web AS applications (such as
SAP EP and Web Dynpro applications) deliver the ini- The Log Configurator enables you to manage logs
tial configuration for logging and tracing that is in turn and traces for individual Java components by defining
used by all of their components. category objects (for logs) or location objects (for
traces) for the components. While you can create
your own categories and locations,5 SAP-supplied
SAP NetWeaver components and applications also
come with some predefined top-level and default
categories and locations that help to simplify the
 Sharing Log or Trace Files task of identifying and analyzing messages associ-
Across Applications ated with a particular application. You can even use
these predefined categories and locations for your
Suppose you are interested in log messages that custom-built applications. For example, a custom-
are generated by more than one application.
built application named myApplication might use
You can easily direct messages from several
applications to the same log or trace file using the
the SAP-supplied System/Applications category
log-configuration.xml file or the Log Configurator for logging and its own com.myCompany.myLocation
you can assign the same log destination to one location for tracing. I discuss these predefined
or more categories or locations. However, keep in objects in more detail in the upcoming section
mind that you cannot use the same log destination Taking Advantage of the Predefined Log and Trace
for both the category and location because you Hierarchy.
cannot mix log and trace messages in the same
physical file. Once defined, the category and location objects
are created as a part of the logging and tracing struc-
ture initialization described in the previous section,
which then makes them available to all applications
and to the Visual Administrator. The category and
When SAP Web AS is up and running, and com-
ponents and applications are initialized, you use the 5
For details on creating custom controllers, go to the SAP help portal at
Log Configurator to change the initial configuration http://help.sap.com, and in the SAP NetWeaver documentation, follow
delivered in their associated log-configuration.xml the menu path Application Platform Java Technology in SAP Web
Application Server Administration Manual Server Administration
files. The Log Configurator can activate such changes Logging Log configuration Working with the Advanced Mode
without restarting the server, which is useful when Adding, Editing, and Removing Log Controllers.

38 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 6 Working with the Log Configurator

location objects are organized into a hierarchical using the To simple mode and To advanced mode
structure according to the application or components toggle button at the top of the screen:
logical functional structure.
Simple mode is designed for use on production
Figure 6 shows the Log Configurator open in systems and offers only the basic functionality
the Visual Administrator. The navigation pane on of changing the log controller severity. This
the left lists the available tools in Figure 6, the mode is useful when you need to change the
Log Configurator is selected. The middle pane dis- category or location severity in order to obtain
plays the features for the selected tool. For the Log more detailed information about a particular
Configurator, this pane contains a series of tabs application.
(Categories, Locations, Destinations, and Formatters).
Click on a tab to select an object type, and then navi- Advanced mode (which is shown in Figure 6)
gate to a particular object. The properties of the is designed for use in a development environment
selected object are displayed at the far right. and offers the full configuration functionality.
This mode is helpful when you need to configure
The Log Configurator operates in two modes, logging and tracing for testing and dont want to
simple and advanced, which you switch between restart SAP Web AS after each test.

For site licenses and volume subscriptions, call 1-781-751-8799. 39


SAP Professional Journal March/April 2005

Figure 7 Options for Configuring Categories and Locations


Option Purpose

Destination Indicates the name and location of the physical log or trace file. Each log destination
generates messages in a format defined in the log formatter.

Formatter Defines the output format of messages in the log or trace file. SAP Web AS includes the
following predefined formatters:
ListFormatter, which generates messages in list format and is typically used for log
files
TraceFormatter, which is typically used for trace files
XMLFormatter, which generates messages in either the SAP-defined format or a
custom XML format
You can also define your own formatter using the log configuration file and the Log
Configurator (more on this in the section Understanding the Log Configuration File).

Severity Represents message importance:


Fatal The application is no longer usable.
Error The application cannot complete the task, but is still usable.
Warning The application has detected a potential problem.
Info Displays information about normal task flow and status.
Path The application called one of several key methods (useful during program flow
analysis).
Debug Displays information about the internal program state, such as variable
values.
All Generates all messages.
None The category or location is not active (i.e., does not generate messages).

Figure 7 summarizes the options for defining SAP Web AS startup times and poor system response
categories and locations. SAP delivers all of its times for example, SAP EP users could experience
predefined categories with Info severity and its pre- significant delays in response time.
defined locations with Error severity. This default
configuration provides basic system information You can change the severity of any category or
with acceptable performance. The default category location with the Log Configurator. Once saved,
configuration provides system administrators with your changes overwrite the initial configuration (as
an overview of system availability and common defined in the log configuration file) during startup
functional problems, such as the application failing and are visible in the Log Configurator. However,
to start. The default location configuration generates the initial configuration and subsequent changes are
the information most useful to system integrators stored in separate places, so you can restore the initial
(error messages, application state, and so on), and configuration for the local SAP Web AS node or the
excludes detailed information that is typically used entire cluster at any time. This option is useful for
for problem analysis during development and could optimizing the performance of a new application on
cause significant performance problems in a produc- a development system (see the sidebar on the next
tion system. Be aware that using a lower severity page for more on how to effectively manage your
(such as Debug) for a location can result in long configuration files).

40 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Proactively Manage Disk Space by Archiving Log and Trace Data

The amount of log and trace data generated on a production system can be quite large. Consequently,
logging and tracing normally reuse the same set of files. Each log destination has a count parameter
that defines a fixed number of physical files that are used cyclically and periodically overwritten.

To manage these files more proactively and disable the overwriting behavior, you can activate the auto-
archive feature. Click on the Properties tab in the Log Configurator (as shown in the screenshot below),
and set the value of the ArchiveOldLogFiles property to ON. Instead of being overwritten, log and trace
files are saved in the <server home>/log/archive directory as defined by the ArchivesDirectory property.
Remember to regularly delete these files or archive them to another device to avoid running out of
disk space.

 Note!
Be aware that, in practice, you may be able to manually change logging and tracing configuration only on a
development system because you cannot transport the configuration between SAP Web AS systems development
and production, for example. The component should be delivered with its initial configuration in the log
configuration file so that the system can create its logging and tracing configuration automatically. If the
component is delivered without its log configuration, the categories and locations will not appear in the Log
Configurator, and you therefore cannot modify its properties. The logging and tracing objects will instead inherit
their property settings from their parent objects, which can have undesirable effects for example, if the severity
property is set to NONE in the parent object, by inheriting that setting, the child category or location object will
then be inactive. (For more on parent/child inheritance in logging configuration, see the section Taking Advantage
of the Predefined Log and Trace Hierarchy.)

For site licenses and volume subscriptions, call 1-781-751-8799. 41


SAP Professional Journal March/April 2005

Figure 8 Delivering the Log Configuration File


SAP Web AS Unit Type Format Directory Location
Java-based SAP Web AS components
Server components SDA <SDA root>/server/descriptors
Dispatcher components SDA <SDA root>/dispatcher/descriptors
Java-based SAP Web AS applications
All applications EAR <EAR root>/MATA-INF

Up to this point, youve seen a lot of references located in the /usr/sap/<SID>/JC<InstNo>/SDM


to the log configuration file, which makes configura- directory.7
tion modifications possible, but you have yet to take a
good look at it. Well examine this key file next. In order for the SAP Web AS component or appli-
cation to recognize the logging and tracing configura-
tion, the log configuration file must be included in the
Understanding the Log Configuration File expected package type and deployed to the directory
location shown in Figure 8.
The log configuration file (log-configuration.xml)
defines the logging and tracing configuration for Because SAP Web AS components and applica-
SAP Web AS components and applications. It con- tions are stored in the persistence layer (that is, a data-
tains the configuration details for SAP-supplied base such as MaxDB, Oracle, or Microsoft SQL), you
and custom-built components (services, interfaces, can update the log configuration file to support later
and libraries) and applications that use logging and versions of an application or component. During
tracing objects (categories, locations, destinations, startup, SAP Web AS reads the current logging and
and formatters). tracing configuration from the SAP Web AS persis-
tence layer, which makes the configuration available to
The easiest way to maintain the log configuration applications and visible in the Log Configurator. Any
file is to use the SAP NetWeaver Java Development subsequent configuration changes are stored separately
Infrastructure (JDI), which is the SAP integrated in the SAP Web AS persistence layer, leaving the orig-
development environment (IDE) for Java-based appli- inal configuration (as defined in the log configuration
cations. However, you can also use other XML edi- file) intact. As a result, you can easily restore the initial
tors, such as UltraEdit,6 to manually define the logging configuration from the persistence layer at any time via
and tracing objects. the Installation defaults button in the Log Configurator
toolbar (which you can see back in Figure 6).
As mentioned earlier, all SAP Web AS compo-
nents and applications deliver their initial logging and Figure 9 shows an example log configuration
tracing configuration in a log configuration file that is file that configures logging and tracing for a test
included in the components deployment package application. First note that the initial configuration
SAP Web AS components (services and libraries) use defines three locations to support separate functional-
a Software Delivery Archive (SDA) package, and ity and performance tests. The location
SAP Web AS applications use an Enterprise Archive
(EAR) package. For deployment, you use the 7
The details of deploying SAP Web AS components and applications are
Software Deployment Manager (SDM) tool, which is beyond the scope of this article. For more information, go to the SAP
NetWeaver documentation at http://help.sap.com, and follow the menu
path Application Platform Java Technology in SAP Web Application
Server Development Manual Deployment: Putting It All Together.
6
For more information, go to www.ultraedit.com.

42 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 9 Example Log Configuration File (log-configuration.xml)

1 <?xml version="1.0" encoding="UTF-8"?>


2 <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">

3 <log-configuration>
4 <log-formatters>
5 <log-formatter name="myFormatter" type=" TraceFormatter"/>
6 </log-formatters>

7 <log-destinations>
8 <log-destination name="myDestination" type="FileLog"
a. pattern="./myTestAppl.trc"
b. effective-severity="ALL"
c. encoding="Cp1252"
d. count="5"
e. limit="10000000">
9 <formatter-ref name=" myFormatter"/>
10 </log-destination>
11 </log-destinations>

12 <log-controllers>
13 <log-controller name="com.myCompany.myTest"
effective-severity="ERROR">
14 <associated-destinations>
15 <destination-ref name="myDestination"
association-type="LOG"/>
16 <anonymous-destination type="ConsoleLog"
association-type="PRIVATE-LOG"/>
17 </associated-destinations>
18 </log-controller>

19 <log-controller name="com.myCompany.myTest.Func"
effective-severity="ERROR">
20 <associated-destinations>
21 <destination-ref name="myDestination"
association-type="LOG"/>
22 <anonymous-destination type="ConsoleLog"
association-type="PRIVATE-LOG"/>
23 </associated-destinations>
24 </log-controller>

25 <log-controller name="com.myCompany.myTest.Perf"
effective-severity="ERROR">
26 <associated-destinations>
27 <destination-ref name="myDestination"
association-type="LOG"/>
28 <anonymous-destination type="ConsoleLog"
association-type="PRIVATE-LOG"/>
29 </associated-destinations>
30 </log-controller>
31 </log-controllers>
32 </log-configuration>

For site licenses and volume subscriptions, call 1-781-751-8799. 43


SAP Professional Journal March/April 2005

com.myCompany.myTest.Func (line 19) is used Lets revisit the example log configuration file
for the functionality test, the location from the previous section (refer back to Figure 9).
com.myCompany.myTest.Perf (line 25) is used Lets say that to simplify tracing, the developer creates
for the performance test, and finally, the location three locations (com.myCompany.myTest,
com.myCompany.myTest (line 13) is a parent com.myCompany.myTest.Func, and
location that can be used to propagate the defined com.myCompany.myTest.Perf, as in the
severity, as described in the next section. Defining previous example) in the log configuration file. By
multiple locations enables you to easily separate the simply changing the severity of the parent location
test results when viewing the output in the Log (com.myCompany.myTest), the developer can
Viewer. For example, you can define a filter for the propagate the change to all child locations in a single
location name to select and view messages only from step. This technique is a fast and easy way to activate
a particular test. (For more information about filters, tracing for a particular functional area.
see the section Working with the Log Viewer
Analyzing Logs and Traces later in this article.) This inheritance mechanism is also a simple way
to propagate configuration settings or changes. During
Notice that all three locations use the ERROR sever- logging and tracing initialization (at SAP Web AS
ity (the effective-severity element in lines 13, startup), child categories and locations can inherit
19, and 25) and myDestination as the log destina- properties from their parents, rather than having an
tion (the destination-ref element in lines 15, 21, explicitly defined severity, destination, or formatter.
and 27). In lines 8-10, myDestination is defined
as a file log (the type element in line 8) and uses SAP NetWeaver applications take advantage of
the physical file myTestAppl.trc (the pattern this parent/child inheritance with shared logging and
element in line 8), which is located in the tracing objects that are configured in SAP-supplied
<server home>/log directory. Therefore, all trace SAP Web AS applications. For example, the Portal
messages will be written to the physical file name Runtime service defines the logging and tracing con-
<server home>/log/myTestAppl.trc. The log destina- figuration for SAP EP.
tion uses myFormatter as the log formatter (line 5),
with the SAP-supplied TraceFormatter as the
message formatter.
 Caution!
In the next sections, Ill show you some ways that Do not change any SAP-supplied categories,
you can leverage the predefined log and trace hierar- locations, destinations, or formatters in the log
chy to streamline log configuration for your applica- configuration file for your application there is no
tions and components. guarantee that the object will still work as designed
if you do make changes to it. And while SAP
support can revert configuration changes made via
Taking Advantage of the Predefined Log and the Log Configurator, there is no way to revert
changes made directly to the log configuration file.
Trace Hierarchy
Instead, define new objects with a unique prefix (for
Logging and tracing objects are organized into sepa- example, the com.myCompany namespace) to
rate hierarchical structures, one each for category and distinguish them from SAP-supplied objects.
location. This hierarchical structure enables applica-
tion developers to group all messages associated with
a particular topic or feature. The levels of the hierar-
chy are separated with special characters: a slash (/) Predefined Categories for Logging
for categories (e.g., System/Server) and a period (.)
for locations (e.g., com.sap.engine). The Java-based logging hierarchy is organized into

44 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 10 SAP-Defined Categories for Logging


Category File Location Contains Log Messages for
System
System/Server <server root>/log/system/server.log SAP Web AS
System/Database <server root>/log/system/database.log Database
System/Network <server root>/log/system/network.log Network
System/Security <server root>/log/system/security.log System security issues
System/UserInterface <server root>/log/system/usersession.log User sessions
Applications
Applications/Common/Backup <server root>/log/applications.log Backup functionality
Applications/Common/Archiving <server root>/log/applications.log Archiving functionality
Applications/Common/Resources <server root>/log/applications.log Resource management
Applications/Common/Configuration <server root>/log/applications.log Application configuration
Applications/Common/Security <server root>/log/applications.log Application security
Applications/Common/Failover <server root>/log/applications.log Application failover functionality
(load balancing)
Applications/Common/Infrastructure <server root>/log/applications.log Application infrastructure
Performance
Performance <server root>/log/sat.log Reserved for Single Activity Trace (SAT)

three top-level categories, which are defined in Application categories are globally defined in
the SAP Web AS kernel and visible in the Log the logging and tracing infrastructure and can be
Configurator: used in custom-built applications. Most SAP-
supplied applications use their own predefined subcat-
System, which is the entry point for categories egories. For example, SAP Knowledge Management
used in the SAP Web AS system. and Collaboration uses the Applications/kmc root
category, while SAP XI 3.0 uses the Applications/
Applications, which is the entry point for cate- ExchangeInfrastructure root category and the
gories used in SAP Web AS applications. Applications/ExchangeInfrastructure/
AdapterFramework subcategory. There is one excep-
Performance, which is the top-level category tion SAP EP 6.0 uses the System/Server category
reserved for Single Activity Trace (SAT).8 because the Portal Runtime service is strongly inte-
grated with SAP Web AS.
Figure 10 lists the categories defined in the Java
logging and tracing functionality. Both SAP-supplied
and custom-built applications can use these categories. Application-Specific Locations for Tracing

8
The Java-based logging and tracing solution doesnt
You use Single Activity Trace to track a single activity that is running over
multiple applications/components. For more information, go to the SAP
define any locations for use with tracing in custom-
NetWeaver documentation at http://help.sap.com, and follow the menu built applications. Instead, each SAP-supplied or
path Application Platform Java Technology in SAP Web Application custom-built application is expected to define and
Server Administration Manual Server Administration Monitoring
Techniques for Problem Analysis Single Activity Trace. use its own top-level (or root) location and associated

For site licenses and volume subscriptions, call 1-781-751-8799. 45


SAP Professional Journal March/April 2005

sublocations. For example, as its root location, SAP to the Log Viewer but can be used regardless of
Web AS 6.40 defines com.sap.engine, SAP EP 6.0 whether SAP Web AS is running.
defines com.sap.portal, User Management and
Security defines com.sap.security, and SAP XI 3.0 The Command Line Log Viewer, as its name
defines com.sap.aii. Each application also defines implies, is command-driven (that is, it has no
many sublocations. GUI) and can be used regardless of whether SAP
Web AS is running.
Custom-built applications should follow the same
strategy. Continuing our earlier example, suppose a Lets take a closer look at each in turn.
developer defines com.myCompany.myTest as the
root location for tracing in a test application. When
creating functional and performance tests, the devel- The Log Viewer
oper should also define the sublocations
com.myCompany.myTest.Func (for writing trace mes- Since each SAP Web AS node (dispatcher or server)
sages in the functional test) and has its own root directory containing logs and traces,
com.myCompany.myTest.Perf (for writing trace mes- you need to know which node you want to analyze.
sages in the performance test). Once youve identified the appropriate node, select
Cluster Server <No> Services LogViewer in
Now that you know how to use the Log Manager the Visual Administrator (see Figure 11). When you
and Log Configurator to configure your log and trace first open the Log Viewer, the runtime window
properties and characteristics, lets look at how the (located in the middle pane in Figure 11 ) shows only
Log Viewer can help you analyze the results once you the Cluster element. To open a log or trace, expand
run the log or trace. the runtime hierarchy and double-click on the file. As
you can see in Figure 11, the Log Viewer organizes
logs by SAP Web AS node (dispatchers and servers)
and physical file system structure. The overview win-
dow on the far right displays log and trace messages
Working with the Log Viewer in table form so you can analyze multiple logs and
Analyzing Logs and Traces traces in parallel.
The Log Viewer enables you to view and analyze gen-
erated logs and traces. There are three versions of the
tool; the version you run depends on the current state  Caution!
(that is, running or stopped) of the target server
instance: Be careful when opening multiple log and trace
files simultaneously. Because each open file uses
The Log Viewer is accessed from the Visual SAP Web AS resources (especially memory),
Administrator and can be used only when SAP remember to close any logs and traces that are no
Web AS is running.9 longer needed to avoid memory problems.

The Standalone Log Viewer is accessed by run-


ning its startup file. It offers similar functionality
The example in Figure 11 shows the Log Viewer
with the defaultTrace.trc file open. Lets assume that
9
Technically, the Log Viewer is a client/server component. The client is the Log Manager is configured to write all generated
the Log Viewer service (accessed via the Visual Administrator), while trace messages to this file. Each log and trace file has
the Log Viewer server runs as part of SAP Web AS. This architecture
enables you to connect to different SAP Web AS nodes for log and an identification number (in this case, 16) that is visi-
trace analysis. ble in both the runtime window and the overview

46 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 11 Reviewing a Trace in the Log Viewer

Search string

ID number

ID
number

Overview

Runtime

Filter

window. To obtain more information, in the middle The Log Viewer also provides filter functionality,
pane, click on the Properties tab to display the Log so you can specify more complex search and selection
Viewer configuration or the Additional Info tab to dis- criteria for log or trace messages. In the filter window
play the Log Viewer service references. (at the lower middle part of the screen), enter the
search string in the Text field, then choose the column
To significantly speed up problem analysis, the of interest from the in column dropdown list and
Log Viewer provides search functionality that enables select a filter option by clicking on one of the four
you to quickly identify log or trace messages that con- Include/Exclude buttons. The Log Viewer refreshes
tain specific information. At the top of the overview the currently displayed log or trace overview to dis-
window, enter a search string in the Find field (in this play only the messages that meet your filter criteria.
example, portal.prt). Then choose the column of
interest from the in column dropdown list and click Filters are cumulative, so the Log Viewer adds
on the Search button. The results of the search that each new filter to the existing list. You display and
is, the messages that meet your criteria appear in modify filters on the filter Info tab, which shows all
the lower part of the overview window. defined filters. Click on the Info tab in the filter

For site licenses and volume subscriptions, call 1-781-751-8799. 47


SAP Professional Journal March/April 2005

Figure 12 Managing Filters in the Log Viewer input/output operations to generate log and trace mes-
sages, using logging and tracing extensively can nega-
tively impact system performance. Therefore, the
Log Viewer is especially useful for analyzing which
application and category or location is producing the
most log or trace data, so you can inform the responsi-
ble developer. To perform this task, switch to the
table view in the Log Viewer by clicking on the View
Logs as Table button in the Log Viewer toolbar (see
Figure 13). Then double-click on a column name to
use the built-in sorting functionality. To select the
biggest and fastest-growing files, sort sequentially
on the State, # New Records, and Length columns.
Analyze the contents of each column to determine
the responsible applications and their locations and
categories, which appear in the Location (not visible)
window to display the available filters. As you can and Category columns in the overview window shown
see in Figure 12, the filter Info tab shows an overview in Figure 11.
of filters that apply to all logs and traces (in the Global
Filters section) and filters that apply to a selected log With this feature, you can easily adapt the log or
or trace (in the Selected Log Filters section). Click on trace severity setting to suit the current system situa-
the Active? checkbox to deactivate an existing filter or tion. For example, heavily used applications (whether
click on the Delete icon to delete it. SAP-supplied or custom-built) can have a huge impact
on system performance. After running many tests to
Because the Java-based SAP Web AS uses Java eliminate possible errors and problems, you might

Figure 13 The Log Viewer Table View

48 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

decide to reduce the number of messages generated by You are now equipped with the knowledge you
the application by modifying the severity for several need to get started using Java-based logging with most
or all categories and locations. of the components and applications in your own SAP
NetWeaver environment. SAP EP components require
a slightly different configuration, however. If your
company is like most, SAP EP is playing an increasing
 Caution! role in your business, so its important to understand
these differences in order to fully leverage Java log-
The Log Viewer can potentially cause performance
ging functionality. Well take a quick look at the key
problems. It operates as a client, requesting log
and trace data from SAP Web AS. Trying to open a differences next.
huge log or trace file can significantly slow down
normal user activities, such as the SAP Web AS
response time for a portal request or the SAP XI 3.0
document processing time.
Special Considerations for
SAP EP Logging
As part of the SAP NetWeaver platform, SAP EP
is strongly integrated into the Java-based SAP
The Standalone and Command Line Web AS. Consequently, the Portal Runtime (PRT)
Log Viewers defines the logging and tracing configuration for
The Standalone Log Viewer offers a user interface all SAP-supplied SAP EP components.10 The PRT
and functionality that is similar to the standard Log Logger in SAP EP 6.0 SP6 is backward-compatible
Viewer. However, you can use this version of the tool with previous SAP EP versions (5.0 and 6.0 SP2), so
regardless of whether the Java-based SAP Web AS you can import custom-built SAP EP components into
server is running. You can also use the Standalone the SAP NetWeaver portal and use the new logging
Log Viewer to simultaneously analyze logs and traces and tracing functionality.
on many server nodes. The Standalone Log Viewer
is located in the /usr/sap/<SID>/JC<InstNo>/j2ee/ Taking full advantage of logging and tracing in
admin/logviewer-standalone directory. To start this SAP EP components requires an understanding of how
tool, run its startup script (logviewer.bat on Microsoft its logging and tracing configuration differs from
Windows systems or logviewer.sh on Unix systems). other SAP NetWeaver components. The PRT logging
and tracing configuration:
You can also use the Command Line Log Viewer
to analyze logs and traces. Rather than presenting a Uses a different configuration file (logger.xml)
GUI, this version of the tool is command-driven (and that is specifically designed for use by SAP EP
a big favorite with the Unix crowd). To start the components (both SAP-supplied and custom-built
Command Line Log Viewer, run its startup script components).
(lv.bat on Microsoft Windows systems or lv.sh on
Unix systems), which is located in the Standalone Log Defines its own portalTrace log destination.
Viewer directory. Online documentation is available
via the -h or -help command line parameter. For Does not define its own formatter. Because
example, to request help in Microsoft Windows, go to SAP EP is strongly integrated into SAP Web AS,
the logviewer-standalone directory, start the Microsoft
Windows command line, and enter the command: 10
For simplicity, I use the phrase SAP EP components to collectively
refer to all SAP EP services, components, iViews, master iViews, and
lv.bat -h. so on.

For site licenses and volume subscriptions, call 1-781-751-8799. 49


SAP Professional Journal March/April 2005

all SAP EP components must use the SAP- Understanding the Portal Configuration File
supplied ListFormatter.
The portal configuration file (logger.xml), instead of
Does not define its own category. All SAP EP the log configuration file (log-configuration.xml),
components must use the SAP-defined System/ defines the logging and tracing configuration for
Server category, again because SAP EP is strongly SAP EP components or applications.
integrated into SAP Web AS.
During portal startup or SAP EP component
In addition, SAP EP 6.0 uses different logging deployment, the PRT opens and analyzes the portal
severities in order to support backward-compatibility. configuration file. It then builds an internal mapping
Figure 14 shows how the logging severity in SAP EP between the PRT Logger name and the location,
maps to Java-based SAP NetWeaver logging, which which is defined by an entry (via the locationName
is helpful to understand if you support an SAP element) in the portal configuration file. If the loca-
NetWeaver system with custom-built SAP EP tion doesnt exist, the PRT creates and configures the
components installed. Notice that you deactivate location in the SAP NetWeaver logging and tracing
the PRT Logger in other words, prevent it from infrastructure. From that point, the PRT Logger
sending messages to a log file with the isActive directs all messages to the specified location where
parameter, which produces the same behavior as you can view them in the Log Viewer.
the None severity in other SAP NetWeaver compo-
nents. (See the next section for details about this If you import an SAP EP component from a previ-
parameter.) ous SAP EP version (5.0 or 6.0 SP2), the portal con-
figuration file wont contain a locationName entry for
it. Therefore, the PRT Logger doesnt have a defined
Figure 14 SAP EP and Java Logging location for generating log messages. In this case,
Severity Mapping during portal startup or SAP EP component deploy-
SAP EP Logging Java Logging ment, the PRT generates a warning message in the
Severity Severity System/Server log and composes the location name
Severe Error on the fly by combining the com.sap.portal. prefix
Warning Warning and the PRT Logger name. For example, if the PRT
Info Info Logger name is myLogger, the corresponding location
Debug Debug name is com.sap.portal.myLogger.
All All
isActive = false None But what happens if you forget to define the PRT
Logger in the portal configuration file, resulting in
an undefined logger for the SAP EP component?
In this case, the PRT writes an error message to the
System/Server log and redirects all messages to the
 Tip default com.sap.portal.portal trace location defined in
the PRT.
The PRT Logger name and location must be
unique across all SAP EP components, whether Lets examine a sample portal configuration file
SAP-supplied or custom-built. Its a good idea to to better understand its contents. Figure 15 shows
define a unique name prefix (such as an identifying
an example that defines a PRT Logger named
namespace) in the portal configuration file for
custom-built SAP EP components.
myPortalLogger and maps it to the
com.sap.portal.myPortal location. The location sever-
ity is Error.

50 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.
Pinpoint Problems in Java-Based Applications with Ease Using SAP NetWeaver 04 Logging and Tracing: A System Administrators Guide

Figure 15 Example Portal Configuration File (logger.xml)

1 <Logger name="myPortalLogger"
2 loggerInterface="com.sapportals.portal.prt.logger.ILogger"
3 locationName="com.sap.portal.myPortal"
4 isActive="true"
5 pattern="%d # %20t %15s %m #">
6 <LoggerClass
className="com.sapportals.portal.prt.logger.SimpleFileLogger"
7 level="SEVERE">
8 <param filename="logs/portal.log"
9 append="false"
10 limit="800000">
11 </param>
12 </LoggerClass>
13 </Logger>

Notice that the name element (line 1) defines the Conclusion


name of the PRT Logger that is used in the SAP EP
component. The locationName element (line 3) This article introduced you to the Java-based logging
defines the name of the tracing location to which the and tracing infrastructure delivered with the SAP
PRT Logger messages are written. Next, the combina- NetWeaver 04 platform. You learned how this solu-
tion of the isActive (line 4) and level (line 7) tion works and what features it offers, and how the
elements determines the location severity. If you log and portal configuration files deliver the initial
want to set the location severity to Error, you must logging and tracing configuration for SAP-supplied
set the value of the isActive parameter to true and custom-built SAP NetWeaver applications
and the value of the level parameter to SEVERE. If and components.
the value of the isActive parameter is false, the
location severity will be NONE. All other parameters In addition, you gained an understanding of
in this file (such as file name, pattern, append, and how the easy-to-use tools provided in the Visual
limit) are ignored because the PRT uses predefined Administrator the Log Manager, the Log
values for them for all PRT Loggers. Configurator, and the Log Viewer streamline
the task of administering Java-based logging and
tracing. In fact, the ability to change the configura-
tion on the fly to suit current conditions is invaluable
 Tip to any system administrator. If an application or
Remember that the PRT checks and automatically component causes a problem, you can immediately
re-creates the initial configuration (as defined in reconfigure the category or location severity to
the portal configuration file) during SAP EP provide additional information for troubleshooting.
component startup. If necessary, you can delete a
location on demand. The PRT will automatically
re-create it.
As you have seen, this solution offers both system
administrators and system integrators a powerful and
purpose-built environment for investigating system

For site licenses and volume subscriptions, call 1-781-751-8799. 51


SAP Professional Journal March/April 2005

status and analyzing problems in the Java-based SAP


NetWeaver environment. Whether your system land- Robert Heidasch holds an M.S. in Computer
scape is ABAP-only, Java-only, or a combination of Science and a B.S. in Economics, Management and
Java and ABAP technologies, you now have the
Marketing from the Technical University of Opole.
knowledge you need to investigate any problem more
confidently and efficiently. After receiving his degrees, he worked for several
years as an SAP R/3 consultant and project
manager in the Financials and Logistics areas.
Robert joined SAP in 1999 and worked in the
Logistics area and on the integration of SAP
software with Microsoft products using RFCs,
BAPIs, and Web services. He currently works in
the SAP NetWeaver Foundation group. You can
reach him at robert.heidasch@sap.com.

52 www.SAPpro.com 2005 SAP Professional Journal. Reproduction prohibited. All rights reserved.

S-ar putea să vă placă și