cancel
Showing results for 
Search instead for 
Did you mean: 

Logging on NW04

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

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/us... 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

Former Member
0 Kudos

Hi Detlev,

deactivating "ForceSingleTraceFile" did the trick!

Thanks for that.

michael

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Prakash,

isn't that the SP2 logging ?

As mentioned, on SP2 portals the logging works fine.

Its the Netweaver Portal I'm having trouble with.

cheers

michael

Former Member
0 Kudos

Hi Michael,

As far as i know you still have to activate your loggers in SP9.

Prakash Singh

detlev_beutner
Active Contributor
0 Kudos

Hi Prakash,

> you still have to activate your loggers in SP9

Not if you have activated them within the xml as stated in the last link I gave.

Best regards

Detlev