cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Logging

Former Member
0 Kudos

Hi,

I am trying to set up traces for an EJB application. In the EAR project, i created the log-configuration.xml, specified the formatter, destination, and controller. I then put in all the necessary logging statements into my code, an example is listed below:

private static final boolean DEBUG = logger.beDebug();

if (DEBUG) {Object[] param = new Object[] { input };

logger.entering("Bean.saveXYZ(input)", param);

}

And all the other relevant calls.

However, no folder is being created in the specified location on the hard drive. I have checked the folder permissions and those are set correctly. Also there are other folders containing logs for other applications already present at this destination.

I have also ensured that the Log Configurator in the Visual Admin has the locations showing up correctly.

When i pull up the Log Viewer in the Visual Admin, I see the log destination defined in the tree structure. On expanding the tree there is a "default.trc" file present in there, but on trying to open the file i get an "X" mark next to the filename, and on checking the properties of the file I see "Error" in the Status.

Would anyone have a clue as to what the potential issue could be over here. I checked a lot of the SAP documentation for logging but found nothing that i had missed or done incorrectly. I even deployed the application to a different server, but in that case too i am getting the same response.

All help is appreciated.

Thanks,

Murtaza.

Message was edited by: Murtaza Madraswala

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi, Murtaza,

it depends on the version you are working on but log-configuration.xml will or does not work anymore. As far as I know there is no possibility anymore to write into another than the default trace file.

By the way, I would not assign the return value of beDebug to a final "variable", as you won't ever be able to change effectively the logging severity for the output depending on it, as long as the EJB runs. Instead call beDebug in the if-condition everytime.

Regards

Heiko

Former Member
0 Kudos

Actually, I think there is a way, but I don't think it is recommended and it may screw up your system more than not. As long as this is a dev system that you can reinstall if something goes horribly wrong, you can use the Admin tool to change a property in the LogManager for both the Dispatcher and Server. The property is called ForceSingleTraceFile and the default value is YES. Change this value to NO and this might fix your problem (but it might also corrupt your log configurations, this is what happened to me).

-Steve

-


If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.

0 Kudos

Well, that's what I was talking about: it might not be restricted technically, but could become so anyday (or rather, with any new release). Btw, in J2EE engines applications are not allowed to work with normal files also. Again, in most engines this is not a technical restriction but might become one.

Regards

Heiko