cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing same log file from Dynpro & EJB

Former Member
0 Kudos

Hi friends,

I have an application wherein I want to put logs from my dynpro code as well as my EJB code in the same log file,

But I could not find a way to share the Location (logger) variable among the two places, so that I can write to the single log file.

If I try to refer to the same log file using two different Location variable, they overwrite each others logs.

Please advice.

Thanks

Deepak

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I tried a workaround....

1. I created the log file in the ejbCreate() method of EJB.

and passed the log file name to the webdynpro application using an EJB method.

2.Created the Location variable with the same path in the parameter at both places(WebDynpro & EJB)

3. Created and added the log file in Webdynpro with the same name as in EJB and added to the Location variable.

So, now both the applications are writing log to same log file without overwriting.

Deepak

Stefan-EA
Contributor
0 Kudos

I have my Web DynPro, command bean, EJBs and DAOs all logging to one log file per application.

I setup logging by following this

[how to guide|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c6ada90-0201-0010-4397-b6dcb6e661a2]

In the guide, logging is all setup through the Config Tool. However, on our Web AS, (6.40 SP20), creating destinations had to be done in Visual Administrator