PDA

View Full Version : Systemerrprintln problem in WM6


shyutz
05-21-2003, 03:08
I use system.err.println() that can keep some message in server.log, but I upgrade from WM46 to WM6, it does not work now, what's wrong?

dgreen
05-22-2003, 05:58
Hi, Kevin.

Are you looking at the server console or at the actual log file? Sounds strange but my Flows sometimes stop feeding to the console. Probably an OS issue...

In any case, there are a few options available for logging (including your preferred option). I would recommend using the WmSamples logging Flows. You will need to tweak them for your environment and there is a little bit more overhead, but the services are more reliable and thorough.

If you don't see WmSamples in Developer, log into the Administrator and check whether or not the package is enabled. If it is not enabled, enable it and then refresh Developer. You will be able to drill down into the Package to find the log folder.

Aaron2769 (Unregistered Guest)
08-28-2003, 13:44
Hello,

I too am trying to figure out the best way to solve this problem. The System.err, System.out, and printStackTrace() java commands used to default to the server log in wm4.6. We just upgraded to wm 6.0.1 sp1 and now if a custom java service calls a method from a custom jar file and an exception occurs I'm not getting a stack trace or error message on the server logs like I used to in wm4.6.

Thanks,
Aaron

hamsa
08-29-2003, 07:56
Hi Friends,
You can use com.wm.util.Debug.log(int length,String str) to replace these java commands.

Thanks
Hamsa

Aaron2769 (Unregistered Guest)
08-29-2003, 11:25
Okay thanks. I was hoping there was a solution that wouldn't require any code changes. Changing every java service that we've written in the past 3 years isn't an attractive solution but it doesn't sound like there is an alternative. I guess since all the error messages made it to the server log in wm 4.6 using native java we viewed it as a feature. We have a ticket open with wm support but I wanted to see if anyone else was affected by this missing feature in wm 6.

Aaron2769 (Unregistered Guest)
09-16-2003, 14:07
We received a response from wm support so I figured I'd post it here. Hopefully this doesn't break any rules.

"pub.event.exception:logToFile works in both IS 4.6 and IS 6.0.1. Though it is deprecated in IS 6.0.1 we can use the service pub.event.exception:logToFile. Though the service can not be invoked directly using the insert browse step in the developer, but still it can be used. The differences in 4.6 and 6.0.1 are

a) In ver 4.6 pub.event.exception:logToFile service is default subscribed to Exception event. In ver 6.0.1 developer has to subscribe pub.event.exception:logToFile service to Exception event. Steps to subscribe to Exception event

i) Open Developer.

ii) Open Tools -> Event Manager. This pops up Event Manager for the server window

iii) Select View event subscribe for value to Exception Event.

iv) Add a service

v) Enter input values Service = pub.event.exception:logToFile, Filter = * Enabled =true.

vi) This will subscribe the service to Exception event.

Then if there is any exception thrown in the service then it writes to the log file."

jbraunstein
08-09-2004, 17:23
Unsupported, Undocumented, but works:

com.wm.util.JournalLogger.log(4,90, "Error", "This is my Error Msg");

mcarlson
08-09-2004, 18:42
Jordan,

Thanks for the tip. Want to venture a guess as to the use of the first three parameters? What other valid values are there for the third parm?

Mark