When we are making any java service in designer.Where does out put for System.out.println get printed.Not getting this values either in console or any server/error log.
What syntex do we need to apply to write server log or error Log.
I used below code to write to server.log on developer wM 7.1.2. Hope the same works on designer.
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
“DEBUG TEXT HERE!” );
You may wish to wrap this up in a service for convenience and put it in the shared section of your code (or in a utility class):
public static void debugLog(String text)
{
com.wm.util.JournalLogger.log( com.wm.util.JournalLogger.INFO,
com.wm.util.JournalLogger.FAC_FLOW_SVC,
com.wm.util.JournalLogger.DEBUG,
text );
}
Then in your code you can simply call:
Thanks Mahesh & Holger.
Currenly using wm version is 9.0 and runnins as Service in windows System.
So there will be no console output for System.out command.
@Mahesh,
I have tried with JournalLogger but this was not working for me.Will again try and let you know the result.
println sends output to console. In case of unix, you see in nohup.out. In windows if server started as application, you can view the println in console output. If IS is running as service on windows there is no way[ as far as I know].
Rankesh,
I know this is an Old post, but was still pretty effective - while I was trying to debug a Java service invoking an External AMZ Client libray services. Thanks.