cancel
Showing results for 
Search instead for 
Did you mean: 

Logging...

Former Member
0 Kudos
158

Basic Questions:

  1. How do we do logging in a web DynPro application

  2. where is the log stored ?

  3. where do i get details of logging features?

I have written the following statement in onActionSubmit method of my view:

"logger.infoT(wdThis.wdGetContext().currentContextElement().getUserName());"

Where should i see result? Apart from above, i did not configure anything else.

Additionally, if i use System.out.println(...), where would the result be 'logged'

Any help would be appreciated.

-srini

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Srinivas

Bu default in webdynpro the Location for log messages share the same name as that of your class file from where you are generating the logs. You will have to check if you have set the level to Trace (in this case) on that particular location. The trace messages are written to default.trc viewable through your logviewer. However this can be overriden by the log configurator for webdynpro

This weblog might help

/people/sap.user72/blog/2004/11/10/log-configuration-for-a-web-dynpro-application

Regards

Pran

0 Kudos

Hi everybody,

I still have a same problem: I log in a WebDynpro appl. by using the appropriate location. The messages with severity "Error" or higher appear correctly, but I don't know how to change this severity because the location isn't listed in the VisualAdmin tool although I created the log-configuration.xml in the /META-INF directory.

Best Regards,

Christian

Former Member
0 Kudos

Hi Christian

This is how it should work.

If the name of your view is say <b>LogView</b> and is in the package structre <b>com.logtest.app</b>. What you would see in your code as location definition would be

private static final com.sap.tc.logging.Location logger = 
    com.sap.tc.logging.Location.getLocation(LogView.class);

->Create a logconfigurator file by right clicking your project and choose 'Create Log Configuration File'

->In the Log Controller tab of the configurator add a controller with the name com.logtest.app.LogView

->Save rebuild and deploy

->In the Log Configurator service in Visual admin , under Location tab you will be able to see your location as a tree. You can assign a serverity to any part of the node. This however will override the severity of all locations that inherit that path (so attach Serverity only to the end nodes which narrows definition to respective class files)

Regards

Pran

0 Kudos

Hi Pran,

as I've written before I already did all the steps (and it worked with all "non-WebDynpro" components).

I don't know why it doesn't work in the WebDynpro application and why the location doesn't appear in the log configurator service, even though I can log with severity "Error".

But nevertheless thank you for your answer,

regards,

Christian

Former Member
0 Kudos

Hey Srinivas,

This option System.out is disabled by default on NW 04.

In order to enable it you need to go to the log configurator on the Admin tool. For more information please read the following doc:

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

And weblog:

/people/karsten.geiseler/blog/2005/06/06/netweaver-portal-log-configuration-viewing-part-1

This weblog is devided into 3 parts, I recommend you to read all of them, it is really important for understanding the basics of portal logging.

If you need more asistance I'll be happy to help.

Regards,

Roy

0 Kudos

Hi Srini,

you have also define the output file location and severity like:

logger.addLog(new FileLog("C:
tmp
logging
hook.log"));

logger.setEffectiveSeverity(Severity.ALL);

I would like also to know where is the result logged be System.out.println(...)

Best Regards. Andriy.