Skip to Content

WebDynpro Java log configuration

WebDynpro Java (WDJ) offers the ability to write the logs of an application to a specific log. Instead of writing it to the same logs as the portal – ex.: default.trc – you can define your own file for every application, making it very easy for you, the administrator and the developer to analyze the application.

In your WDJ application, you define a log category. This category will receive all the logs of your application. This looks like this:

private static final realLogger = (Category.APPLICATIONS, “/Portal/Myapp”);

This is done by the developer. The developer has to communicate this category to the NW AS Java Administrator so he can configure the application server. To do so, follow these steps:

 1.  Deploy the WDJ application.
 2.  Configure the Application Server. Open Visual Administrator and connect to the server.
   a. Service: Log Configurator
   b. Click on “To advanced mode”
   c. Select the tab “Destinations”
   d. Select “New”
   e. Configure the destination.
   The server will create the file specified in File Name Pattern when the application is writing to the log for the 1st time. This file does not needed to be created first.
  •  Name:
  • Type: FileLog
  • File Name Pattern: ./log/applications/
  • Maximum File Size: 10485760
  • Number Of Files: 10
   f. After the destinations has been created, you need to specify a formatter. The formatter takes care on how to format the resulting log output.
  •  Click on “Add”
  • Create an anonymous formatter by selecting “Anonymous”
  • Select “ListFormatter. You can also create your own formatter or select a different anonymous formatter.
   g. Switch to “Categories”
   h. Navigate inside the tree to: Applications -> Portal -> Myapp. This path is specified by the developer. When he created the log category in the WDJ application, he specified (in our example!):
   private static final realLogger = (Category.APPLICATIONS, “/Portal/Myapp”);
   This means that the specified category is Application and the path there is Portal and Myapp. Therefore, this shows up in the VA as: Applications -> Portal -> Myapp
   * if this entry isn’t already there, you can simply create it.
   i. Select “Add” in the “Destinations” tab
   j. Select the destination created above (
   k. Click on “Save” and “Apply to all server nodes”
 3.  Test the configuration in the portal
   a. Access Content Administration -> Web Dynpro
   b. Select the component in the deployed component section and run the application
 4.  Verify the log
  In the portal server, check that the log was created in the correct location and that the Web Dynpro application is writing to it. As the location (./log/applications/ is relative, the full path is:
   Check the content with notepad, less, more, tail, NWA, Visual Adminstrator or another program.
You must be Logged on to comment or reply to a post.