cancel
Showing results for 
Search instead for 
Did you mean: 

Replace or Add a 3rd party logging api like log4j

Former Member
0 Kudos
88

Hi,

is it possible to add a extra logging api to the default SAP Portal logging api?

And when it is possible, how can I make it.

Regards Thomas Fanninger

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I would like to print my logs to an SYSLog-Server. So, my idea was that I use the log4j API or did you know a better solution?

Regards

Fanninger thomas

0 Kudos

Hi,

You can also use the SAP logging and add a new destination, so that it writes into your SYSLog-Server.

http://help.sap.com/saphelp_nw70/helpdata/EN/30/530607e0262a44b3a0030dfba35e15/frameset.htm

http://help.sap.com/saphelp_nw70/helpdata/EN/0a/d14a09bef35146946ab9ef6436140f/frameset.htm

Regards,

Praveen Gudapati

Former Member
0 Kudos

Hi, thanks for your answer.

But I would like to change the SAP Portal system-logging-API and not the logging-api for application.

Regards

Fanninger Thomas

0 Kudos

Hi,

I am not sure what you are trying achieve, so it is better you explain you usecase clearly.

The only thing that you can do is implement you own java classes using the SAP Logging API to suite your needs.

For example you implement your own logger class by implementing ILogger class.

Once it is ready you can register it like this:

<Logger name="com.mycompany.portal.foo" loggerInterface="com.sapportals.portal.prt.logger.ILogger" isActive="true">
<LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="ERROR">
<param filename="logs/com.mycompany.portal.foo.log" append="true" /> 
</LoggerClass>
</Logger>

Check this blog for more:

blog:

http://help.sap.com/javadocs/NW04S/current/ep/com/sapportals/portal/prt/logger/ILogger.html

Regards,

Praveen Gudapati