ArcPy: How to Write Log Messages to ArcGIS Server

arcgis-10.1arcpygeoprocessing-service

Published geoprocessing services write logs that are available at ArcGis Server Manager (arcgis-server/arcgis/manager/log.html)

Arcpy has AddMessage, AddError, etc methods for logging, but they are doesn't works when script is published as geoprocessing service. As I understand, they works only locally in ArcMap.

Is there some way to write server logs from arcpy?

Best Answer

If you use the arcpy.AddMessage(message), it should show up in your published GP, but it shows up on the job messages page (not the server logs as you indicated in your question). You also need to enable this in the service properties (or when you publish the service):

enter image description here

Related Question