GeoEco.Logging.Logger

class GeoEco.Logging.Logger

Bases: object

Provides functions for reporting messages to the user from the GeoEco package.

This class wraps the Python logging module. Callers outside of the GeoEco package may use this class but we recommend they use logging directly instead.

This class logs all messages to the GeoEco logging channel. Parts of the GeoEco package log to other channels. To see what these are, consult the file GeoEco/Configuration/Logging.ini.

Note

Do not instantiate this class. It is a collection of classmethods intended to be invoked on the class rather than an instance of it, like this:

from GeoEco.Logging import Logger

Logger.Info('Hello, world!')

Methods

ActivateArcGISLogging

Instructs Logger to stop queuing messages destined for ArcGIS and release any that are currently queued up.

Debug

Reports a debugging message to the user.

Error

Reports an error message to the user.

GetLogErrorsAsWarnings

Returns True if errors are currently set to be logged as warnings.

GetLogInfoAsDebug

Returns True if informational messages are currently set to be logged as debug messages.

Info

Reports an informational message to the user.

Initialize

Initializes the logging system.

LogExceptionAsError

Logs a Python exception caught by a GeoEco class as an error message and additional information as debug messages.

LogExceptionAsWarning

Logs a Python exception caught by a GeoEco class as a warning message and additional information as debug messages.

LogInfoAndSetInfoToDebug

Reports an informational message and then calls Logger.LogInfoAsDebug(True) and returns its value.

RaiseException

Raises a Python exception and logs it as an error message and additional information as debug messages.

SetLogErrorsAsWarnings

Enable or disable the logging of errors as warnings.

SetLogInfoAsDebug

Enable or disable the logging of informational messages as debug messages.

Warning

Reports a warning message to the user.