Select to view content in your preferred language

where is the message print with" System.out.print"  in Java SOE?

1095
3
07-25-2012 05:47 AM
ChunjieXu
Emerging Contributor
hi, All:

    A lot of developers like to use the system.out.print function to print message, where is these message going when using the System.out.print in a Java SOE?
Tags (2)
0 Kudos
3 Replies
AjitDharmik
Occasional Contributor
Hi,

If you'd like to print messages from inside SOEs, you could use ILog.addMessage() and then view those messages in logs for the map service the SOE is enabled on.

You could debug into the SOE too, to inspect its state at any time. (http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/#/Debugging_SOEs/000100000770000...)

Thanks!
Ajit
0 Kudos
ChunjieXu
Emerging Contributor
Thanks for the reply.

Actually, it is very useful to know where the System.out.println going�?because  if we build a complicated business logic.

We will test the code outside the SOE. At that time, we use the system.out.print or log4j to create the log. So if I know the where is the message going, we do not need to modify the code to use the ILog but still get the log.

For the SOE debug, I have to re-deploy everytime after I modify the code, it took a lot of steps and is really unconvenient.
0 Kudos
AjitDharmik
Occasional Contributor
At 10.1, if you change SOE code, you do need to "update" the SOE and not redeploy it. Manager allows just updating the SOE.

About where sysouts go:

These go to a log file in the C:\Users\<user provided while installing Server>\AppData\Local\ESRI\Server10.1\Java\Log.

To enable this logging, you must set the HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Java Extensions\Logging key to 1.

Hope this helps.

Thanks!
Ajit
0 Kudos