cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new logger

xavier_dehairs2
Active Participant
0 Kudos

Hello we've created a new logger in the file logger.xml, but unfortunately, even the fact that we know that the logger is active (by using the logger.isActive() method), we didn't see any file log created. The file specified for our logger doesn't exist. How is that possible ? We've restareted the J2EE engine after our changes and we also added the same entry in defaultLogger.xml, in case of.

Here is the entry we've added :

<!-- Logger for Damages portal project -->

<Logger name="damages_logger" loggerInterface="com.sapportals.portal.prt.logger.ILogger" isActive="true" pattern="%d # %20t %15s %m #">

<LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="ALL">

<param filename="logs/damages.log" append="false" limit="800000">

</param>

</LoggerClass>

</Logger>

So in the folder drive:\usr\sap\EP62\j2ee\j2ee_00\cluster\server\services\servlet_jsp\work\jspTemp\irj\root\WEB-INF\portal\logs

there should be a "damages_logger" file right ?

Thank you for your help

Xavier.

PS : We are in EP6 SP2 Patch 3 Hotfix 7

Accepted Solutions (1)

Accepted Solutions (1)

xavier_dehairs2
Active Participant
0 Kudos

The path should be correct because it's the one mentionned in the documentation.

But maybe this attribute was not defined in SP2 ...

I will try, and see if it works.

Thank you

xavier

Former Member
0 Kudos

Hi Xavier,

could you check if you can find the logger in

/usr/sap/<ID>/j2ee/j2ee_00/cluster/server/managers/log/portal/logs?

That's the place where our logs are stored (SP2, Patch4).

Can you see the logger if you access the Logging Console via System Administration - Monitoring - Portal - Logging Console in "Select Logger"?

Hope this helps,

Holger.

Answers (3)

Answers (3)

xavier_dehairs2
Active Participant
0 Kudos

Bingo !

The location was wrong

Thank you very much !

Xavier

Former Member
0 Kudos

Hi,

where should the logger.xml be placed?

Thanks,

Ray

xavier_dehairs2
Active Participant
0 Kudos

What do you mean by "locationName" ? I don't have any entry in the logger.xml that has this attribute.

Can you put an example in the thread ?

Thanks,

Xavier.

PS : I've changed the logger.xml from the system/xml folder. I've seen in another forum topic that we can put a custom logger.xml in the logger folder of our component but that is not a good solution i think, since we have to duplicate this file in all our components.

Former Member
0 Kudos

In my (SP6) portal, a logger entry looks like this, see below. However, if there is no such locationName att in your logger xml, that's most probably the wrong path to try.

<Logger name="portal_logger" loggerInterface="com.sapportals.portal.prt.logger.ILogger" locationName="com.sap.portal.portal" isActive="true" pattern="%d # %20t %15s %m #">

<LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="ALL">

<param filename="logs/portal.log" append="false" limit="800000">

</param>

</LoggerClass>

</Logger>

Former Member
0 Kudos

Had a look at the logger.xml file and - maybe you're missing the locationName attribute in the logger tag? At least, in my EP 6 SP6 there is such an attribute.

Regards,

Armin