GeoEco.Logging.Logger.Initialize

classmethod Logger.Initialize(activateArcGISLogging=False, loggingConfigFile=None)

Initializes the logging system.

Parameters:
  • activateArcGISLogging (bool, optional) – If true, logging messages will be delivered to the ArcGIS geoprocessing system and appear in the ArcGIS user interface. If false, they will be reported to other logging destinations but will be queued in memory for ArcGIS until the ActivateArcGISLogging() method is called. To limit memory consumption in the event that the method is never called, the queue retains only the most recent 1000 messages. If you are calling Initialize() but not running as part of an ArcGIS geoprocessing do not pass True for this parameter. Passing True will decrease performance by initializing the ArcGIS geoprocessor when it might not be necessary to do so. (The memory used by the queue is negligible.)

  • loggingConfigFile (str, optional) –

    Path to the logging configuration file. If not provided, this function first attempts to load a configuration file from a user-specific location that depends on the operating system:

    • On Microsoft Windows: %APPDATA%\GeoEco\Logging.ini (e.g. C:\Users\Jason\AppData\Roaming\GeoEco\Logging.ini.)

    • On Linux: ~/.config/GeoEco/Logging.ini. The location of ~/.config can be overridden with the XDG_CONFIG_HOME environment variable.

    If the user-specific file does not exist or fails to be loaded, a system-wide location will be tried:

    • On Microsoft Windows: GeoEco\Configuration\Logging.ini in the site-packages directory of the Python installation. This file is created when GeoEco is installed.

    • On Linux: /etc/GeoEco/Logging.ini, if it exists. It is not created there when GeoEco is installed, and if an administrator has not created it, then GeoEco\Configuration\Logging.ini in the site-packages directory of the Python installation will be used instead. This file is created when GeoEco is installed.

    If neither is found (which would only occur if the GeoEco package installation is corrupt), then all informational, warning, and error messages will be logged to the console (i.e. the stdout stream). Minimum length꞉ 1. Must exist.