Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP Logging- Confuguring log-configuration.xml

Hi,

I am implementing saplogging, my log-configuration.xml looks like this.

<log-formatters>

<log-formatter

name="DefaultFormatter"

type="ListFormatter"/>

</log-formatters>

<log-destinations>

<log-destination

count="5"

effective-severity="ALL"

limit="80000"

name="MyLog4Log"

pattern="./log/applications/MyLog.%g.log" type="FileLog"/>

<log-controllers>

<log-controller

effective-severity="ALL"

maximum-severity="ALL"

minimum-severity="ALL"

name="/Applications/myLogAP">

<associated-destinations>

<destination-ref association-type="LOG" name="MyLog4Log"/>

</associated-destinations>

</log-controller>

and in my class I am implementing like this.

private static Category catLogger = null;

catLogge=Category.getCategoryCategory.APPS_COMMON, "myLogAP");

catLogger.errorT(...,...,...);

It is not creating any file by name MyLog.0.log

But if I use

catLogger.addLog(new FileLog("./log/applications/MyLog.%g.log"));

it is creating file and puttion logs into it. i dont think its a good practice to use the second one.

I want to get name only from log-configuration.xml.

Please put your suggession and comments

Regards

Abhijith YS

Former Member
Not what you were looking for? View more on this topic or Ask a question