ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

SetLogHistory

  • Summary
  • Discussion
  • Syntax
  • Code sample

Summary

For script tools and stand-alone scripts (scripts run outside of an ArcGIS application), you can enable or disable history logging using the SetLogHistory function.

When log history is activated, after each geoprocessing tool is run, an entry with the information about the tool will be added to the following:

  • The history log file, an Extensible Markup language (XML) file
  • The Geoprocessing history section of the metadata of the data modified or created by the tool

Discussion

When running a script, history logging is activated by default. To disable history logging, use arcpy.SetLogHistory(False).

Syntax

SetLogHistory (log_history)
ParameterExplanationData Type
log_history

True to enable geoprocessing logging history and False to disable.

Boolean

Code sample

SetLogHistory example

Turn off geoprocessing log history.

import arcpy
arcpy.SetLogHistory(False)

Related topics

  • GetLogHistory
  • Viewing tool execution history

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal