cancel
Showing results for 
Search instead for 
Did you mean: 

using logging in WebDynpro application

Former Member
0 Kudos

Hi All,

I m working on webdynpro application. when ever error occurs at runtime , the entire error log is diplayed on browser thus showing code details to user . how cn i avoid showing error log in browser ?? i hv read about logging , will it help to resolve my problem?? if yes thn how ?? please send me simple steps to follow than web links. Thnx in advance.

Kavita

Accepted Solutions (1)

Accepted Solutions (1)

former_member182294
Active Contributor
0 Kudos

Hi Kavita,

Let me make it clear about logging:

Logging and tracing are used to debug the code at runtime, these logs are stored in server and not visible to end user in the browser.

I am sure that the problem you are facing is entirely different from this, problem is the way you have coded:

- You should handle the exceptions using try and catch blocks. For example if you are executing RFC then you should catch WDDynamicRFCExecuteException and then you can log the details to standard logger.

- But NullpointerException or ArrayIndexOutofBoundException etc...these kind of exceptions you should not catch but you should code properly like checking for not null condition or checking index size.

If you handle your code well end user wont see any log traces in the browser. If you are still not clear paste the log printed in the browser so that we can help further.

Regards

Abhilash

Former Member
0 Kudos

Hi Abhilash,

that means although i use logging API , but if unchecked exception like null pointer or array out of bound occurs thn error details will be displayed in browser only. right or wrong??

former_member182294
Active Contributor
0 Kudos

Yes, unchecked exceptions will be displayed in the browser always. Do not try to handle these kind of exceptions by using try...catch blocks. But change your logic so that such kind of exceptions never occur.

Regards

Abhilash

Former Member
0 Kudos

Thnx.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kavita,

You are getting the runtime exception for eg. NullPointerException on screen describing the component that is causing the error with the line number.

These things should be handled programatically using the try catch block.

If you ask is there a way to shorten this default exception that it displays on the screen and change it as per your requirement then the answer is no.

Regards,

Murtuza

Former Member
0 Kudos

Hi Kavita

This is the functionality of webdynpro to display the error message on the browser,which helps the developer to check where the error is happening and probable reason of the error, there is no option available to clear these messages.

Regards

Chaitanya.A

Former Member
0 Kudos

Hi,

Pl go through the following thread

Regards

Ayyapparaj

Former Member
0 Kudos

hi ,

I hv gone through thread given by u . it is written in that thread but not much use. can u send me some more detailed information for setting logger for webdynpro application???

Former Member
0 Kudos