Hyper Open Edge Cloud

Guideline Never Log Level Info Or More In Execution Path

Avoid trivial logs.
  • Last Update:2024-04-16
  • Version:001
  • Language:en

Never Log Level Info Or More In Execution Path

There should be no "trivial" logs in the normal execution path (see Logging in Python and EventLogger).

Existing Log Levels are:


def severity_string(severity, mapping={
    -300: 'TRACE',
    -200: 'DEBUG',
    -100: 'BLATHER',
       0: 'INFO',
     100: 'PROBLEM',
     200: 'ERROR',
     300: 'PANIC',
    }):
    """Convert a severity code to a string."""
    s = mapping.get(int(severity), '')
    return "%s(%s)" % (s, severity)