Skip to Content
0
Former Member
May 02, 2005 at 01:12 PM

Logging on NW04

36 Views

Hi,

I'm trying to implement logging a Netweaver application.

The application must be backwards compatible with SP2. The SP2

logging works fine, but i can't get the Netweaver logging to

work even though.

Following are the steps i took (got this from sap.help.com)

http://help.sap.com/saphelp_nw04/helpdata/en/e2/f410409f088f5ce10000000a155106/frameset.htm

NetWeaver version:

Stack 10

Configuration of the Portal through visual admin:

=================================================

1. Navigate to Server->Services->LogConfigurator

2. Click the 'to Advance mode' tab

3. Click the 'Destinations' tab and clicked 'new' for a new Destination

entered the following data:

Name: FrameworkLog

Type: FileLog

Pattern: ./log/framework.log

Limit: 500000

Count: 5

Severity: All

Formatter: Anonymous[ListFormatter]

4. Created a Location by choosing the "Location" tab

Name: framework.loger

Min: all

Max: all

Severity: all

5. Assigned the Destination created in (3) to the new Location

Configuration in the logger.xml file:

=====================================

added the following to the logger.xml file:

the filename parameter is kept for backwards compatibility reasons.

<Server>

<Logger name="framework.logger"

loggerInterface="com.sapportals.portal.prt.logger.ILogger"

isActive="true"

locationName = "framework.logger"

>

<LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="ALL">

<param filename="logs/framework.logger.log" append="false"/>

</LoggerClass>

</Logger>

</Server>

Usage in source code:

=====================

static Location location = Location.getLocation("framework.logger");

...

location.debugT(xxx);

The problem is:

Even though I save everything in the Visual Administrator (after step 5) the assigned

destination disappears if you, say browse the logviewer and return to the Location.

All log messages are written to the defaultTrace.

I tried using a Category. Created a new Category in the Visual Admin and assigned the

Destination created in step 3.

The usage in the source code was

static Category category = Category.getCategory("framework.logger");

. . .

// then using the location attempted to write

category.info(location, "xxxxx");

Once again everything was written to defaultTrace. the one difference however,

was that a (empty) logfile was created and the Destination assigned to

the Category did not 'get lost'

any hints as to what i'm doing wrong would be greatly appreciated.

cheers

michael