cancel
Showing results for 
Search instead for 
Did you mean: 

Help with logging

Former Member
0 Kudos

We have setup logging through NWDS for a WebDynpro for Java project. Not matter what we try, we can not get a log file written to the destination specified. Here is a log-configuration file.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
<log-configuration>
	<log-formatters>
		<log-formatter 
			name="com.test.formatter" 
			pattern="%l %d %s %m" 
			type="TraceFormatter"/>
	</log-formatters>
	<log-destinations>
		<log-destination 
			effective-severity="ALL" 
			name="com.test.log.dest.app" 
			pattern="\log\applications\CSS.log" 
			type="FileLog">
			<formatter-ref 
				name="com.test.formatter"/>
		</log-destination>
	</log-destinations>
	<log-controllers>
		<log-controller 
			effective-severity="ALL" 
			maximum-severity="ALL" 
			minimum-severity="ALL" 
			name="com.test.custselfservice.wd">
			<associated-destinations>
				<destination-ref 
					association-type="LOG" 
					name="com.test.log.dest.app"/>
				<anonymous-destination 
					association-type="LOG" 
					type="FileLog"/>
			</associated-destinations>
		</log-controller>
	</log-controllers>
</log-configuration>

We are using the looger in the following code within a method which is always called.


logger.fatalT("searchCompanyNumber", "log test");
logger.exiting("searchCompanyNumber");

Does anyone know what we are doing wrong? Maximum points for the first helpful answer.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you have deployed the application once without a log-configuration file, try by undeploying and re-deploying the application.. It worked for me. If you can see your application in Visual Admin's log configuration service, then everything is fine.

Thanks

Ram

Former Member
0 Kudos

We did what you suggest, but it did not work. We do not see the application in Visual Admin. However, the application's log outputs are being written to the default trace logs. Any other ideas?

Stefan-EA
Contributor
0 Kudos

Take a look at this [document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c6ada90-0201-0010-4397-b6dcb6e661a2], it will show you how to setup multiple trace files in Visual Admin. Specifically, take a look at page 17.

Former Member
0 Kudos

Stefan,

Your suggestion worked. Thank you.

Answers (0)