SetLogHistory

サマリー

Controls whether information about the operation of geoprocessing tools is written to an external log file.

説明

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

To control whether geoprocessing tool input and output datasets' metadata is updated, use the SetLogMetadata function.

構文

SetLogHistory (log_history)
パラメーター説明データ タイプ
log_history

Specifies whether geoprocessing history logging is enabled.

  • True—XML log files will be created in the %AppData%\Esri\ArcGISPro\ArcToolbox\History directory.
  • False—XML log files will not be created.
Boolean

コードのサンプル

SetLogHistory example

Disable history logging, if enabled.

import arcpy
if arcpy.GetLogHistory():
    arcpy.SetLogHistory(False)

関連トピック


このトピックの内容