runtime/loglevels.py
author Edouard Tisserant
Mon, 31 Aug 2020 13:54:08 +0200
changeset 2706 65f35ac97cd6
parent 1973 cc7a46953471
permissions -rw-r--r--
Attempt to workaround problem reported about empty plc.xml after unrelated crash. Now, if etree model is corrupted in a way tostring() would generate an empty string, exception prevents saving.
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# See COPYING.Runtime file for copyrights details.

LogLevels = ["CRITICAL", "WARNING", "INFO", "DEBUG"]
LogLevelsCount = len(LogLevels)
LogLevelsDict = dict(zip(LogLevels, range(LogLevelsCount)))
LogLevelsDefault = LogLevelsDict["DEBUG"]