Most Powerful Open Source ERP

Guideline Never Log Level Info Or More In Execution Path

Avoid trivial logs.
  • Last Update:2019-07-15
  • Version:001
  • Language:en

Never Log Level Info Or More In Execution Path

There should be no "trivial" logs in the normal exection 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)