• Guido van Rossum's avatar
    Several changes, mostly to speed up logging when : · c526d348
    Guido van Rossum authored
    - Cache the translations from severity to level and string in dicts,
      so these are normally done with a single dict.get() call rather than
      a Python function call.
    
    - Extract the PEP 282 level first, and check it against the effective
      level of the logger, so we can take an early exit if the logger
      won't handle the event.
    
    - Got rid of textwrap.  It slows things down, can frustrate grepping
      programs, and wasn't effective unless you were using Python 2.3
      anyway.
    
    - Got rid of the addHandler(NullHandler()) (seems like superstition).
    
    - Got rid of the log_format class variable (YAGNI).
    c526d348
EventLogger.py 5.79 KB