Skip to Content
author's profile photo
Former Member

Logging on NW04

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    May 02, 2005 at 02:16 PM

    Hi Michael,

    probably you didn't deactivate ForceSingleTraceFile, see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars/using logging and tracing on the sap web as java.pdf pages 12-17

    Also see http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm for portal specific statements.

    Hope it helps

    Detlev

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    May 02, 2005 at 01:41 PM

    Hi Michael,

    Have you activated the particular logger that you are writing to?

    1. Navigate to

    <b>Support Desk->Portal RunTime->Log Admin</b>

    2. Select your logger and Click on <b>configuration mode</b> button.

    3. Select <b>logger activated</b> value to <b>true</b> and <b>Level</b> to whatever messages you want to the system to log.

    4. Click on apply

    Message was edited by: Prakash Singh

    Add comment
    10|10000 characters needed characters exceeded