GeoEco.Logging.Logger.SetLogInfoAsDebug

classmethod Logger.SetLogInfoAsDebug(logInfoAsDebug)

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

Informational messages describe major processing steps that may be interesting to the user but do not require the user to take any action. For example, a function that performs three major processing tasks might report an informational message after each step is finished.

Sometimes your function may repeatedly call another function to accomplish some processing that you consider to be relatively unimportant. For example, your function may copy a bunch of files, and you might want to inform the user that you are performing the copying but do not want to inform them about every file. To avoid overwhelming the user with informational messages, you can force them to be logged as debug messages like this:

oldValue = Logger.SetLogInfoAsDebug(True)
try:
    # Do your work here
finally:
    Logger.SetLogInfoAsDebug(oldValue)
Parameters:

logInfoAsDebug (bool) – If True, informational messages will now be logged as debug messages. If False, informational messages will be logged as informational.

Returns:

Value of logInfoAsDebug prior to this function being called. Capture this if you want to call SetLogInfoAsDebug() again to restore the old value.

Return type:

bool