Turning on/off geoprocessing history via arcpy?

7323
14
08-08-2011 03:48 PM
ChrisSnyder
Honored Contributor
Anyone know how to turn off the geoprocessing history in ArcGIS v10.0 (arcpy) via Python?

Seems like ESRI got rid of the gp.loghistory setting, and I can't seem to find a way to turn it off in arcpy...
Tags (2)
14 Replies
MelissaJarman
Esri Contributor

Your post was from quite some time ago, but I am finding that the SetLogHistory (false) is working as expected in arcpy. I am not finding any additional XML inserted into my GDB_ITEMS documentation column for the workspace after executing a compress after arcpy.SetLogHistory(False). Let Support Services know if you are encountering this as an issue.

>>> arcpy.SetLogHistory(False)

>>> arcpy.Compress_management(r'Database Connections\sqlserver - blakley -  10.3.sde')

<Result 'Database Connections\\sqlserver - blakley -  10.3.sde'>

>>>

0 Kudos
DianeMcConnaughey
Deactivated User
Is there any way to delete geoprocessing history from the metadata in ArcGIS 10.  There was a script for 9.3.x that did this, but I'm a little reluctant to use it in 10, because of the changes in Metadata from 9 to 10
0 Kudos
LoganPugh
Frequent Contributor
Is there any way to delete geoprocessing history from the metadata in ArcGIS 10.  There was a script for 9.3.x that did this, but I'm a little reluctant to use it in 10, because of the changes in Metadata from 9 to 10


http://resources.arcgis.com/gallery/file/geodatabase/details?entryID=0F00C386-1422-2418-7FA6-03F84C1...
0 Kudos
SimonLiu1
Emerging Contributor

This is quite a necro, apologies.

However I'm finding that none of these flags work  to not write geoprocessing history to the metadata. It is successful that there are no xml files being generated at least. But the biggest issue is GP history in metadata which slows down GP tools (personal experience, what took 15 seconds jumped to 15 minutes and back to 15 seconds after I cleared the history).

Specs:

ArcMap 10.6.1/Pro 2.3.3. 

This is all on SDE and I'm running my scripts externally not in ArcMap or Pro.

It's ridiculous that there is an official ESRI function to turn it off but it doesn't work.

https://desktop.arcgis.com/en/arcmap/10.6/analyze/arcpy-functions/setloghistory.htm

https://pro.arcgis.com/en/pro-app/arcpy/functions/setloghistory.htm

0 Kudos
RobertHolliday
Occasional Contributor

Greetings,

ESRI technical support logged BUG-000128506 regarding SetLogHistory function not functioning properly. I have this same issue. In my case and verified by tech support SetLogHistory is functioning as expected when the code is executed from within Pro from a python prompt. SetLogHistory is also functioning as expected if the code is tied to a toolbox tool.

Python 3.6.x

ArcGIS Pro 2.4.3