HOW TO

Use the Enterprise Log Filter script

Last Published: April 24, 2025

Summary

The Enterprise Log Filter is a Python script that condenses ArcGIS Enterprise duplicate log entries while providing a count of the number of occurrences of a log message, and its first and last timestamps. ArcGIS Enterprise versions 11.4, 11.3, 11.2, 11.1, and 10.9.1 are supported. 

The Enterprise Log Filter can read an ArcGIS Server, Portal for ArcGIS, ArcGIS Data Store, or ArcGIS Server Service log. The script input can be an individual file ending in '.log' or a directory of '.log' files. 

To use this script, download the attached file and follow the instructions provided below.

Note:
This tool exports log messages that include URLs and directory paths associated with the ArcGIS Enterprise environment. Discretion is advised when sharing this information outside of your organization.

Procedure

Setup

  1. Download and extract the LogFilter-main.zip file to a machine that has ArcGIS Server installed.
    • Either ArcGIS Server or Python 3.7 is required as they include the necessary Python environment for the Log Filter to run.
  2. Once the folder is extracted it contains a README.md file with instructions in a LogFilter-main file folder.
  3. Open the LogFilter-main folder.

view of LogFilter-main folder and files in file browser

Run the Script

  1. Open a Command Prompt as an administrator.
  2. Change the directory to where you saved the LogFilter-main folder.
    • The following command can vary depending on where you saved the LogFilter-main folder. This example has the LogFilter-main saved to the C: drive.

Example:

cd C:\LogFilter-main\LogFilter-main
  1. While in this directory you will need to call the Python environment that runs the EnterpriseLogFilter script. The Python environment can be called from the ArcGIS Server installation.
    • Additionally, these paths can vary if the default installation paths are not used. If you have used a different drive letter or installation location, locate your ArcGIS Server's python.exe.
    • By default, ArcGIS Server's Python environment can be found at:
C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\Python.exe
  • Syntax for running script with ArcGIS Server's default installation path:
C:\EnterpriseLogFilter>"C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe" EnterpriseLogFilter.py
  1. Enter the path to the directory containing the '.log' files or specify an individual '.log' file.

Directory example:

C:\arcgisserver\logs\<machine>\server
  • OR

File name example:

C:\arcgisserver\logs\<machine>\server\<file>.log

  1. Enter a path to save the output file, including the name of the file and extension.

Example output file path:

C:\Users\<user>\Desktop\outputfile.log

  1. Enter the log level(s) you would like to skip, separated by commas.
    • For example: DEBUG, VERBOSE, INFO
    • If you wish to include all levels in the output file: press Enter.

  1. Run the script.

You should see a brief output of the logs analyzed in the terminal and a new output file where the output file path was entered.

Script Output

Once the script has been run, an output file is generated using the output file path and name provided in Step 5 of 'Run the Script', above.

Article ID: 000034630

Software:
  • ArcGIS Data Store
  • Portal for ArcGIS
  • ArcGIS Server
  • ArcGIS Enterprise

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options