Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazily evaluate log message parameters #690

Merged

Commits on Sep 5, 2023

  1. Lazily evaluate log message parameters

    Logging like this:
    
        logger.debug("Hello, %s" % name)
    
    causes the message string to always be interpolated even if the
    message is not going to be logged.
    
    Logging like this:
    
        logger.debug("Hello, %s", name)
    
    will mean the string is only ever interpolated if it will be logged.
    
    In practice here this will make little difference if the log level
    is INFO or above.
    
    See:
    
    https://docs.python.org/3/howto/logging.html#optimization
    https://stackoverflow.com/questions/4148790/lazy-logger-message-string-evaluation
    petedmarsh committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    abe2c95 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Configuration menu
    Copy the full SHA
    bdeedb1 View commit details
    Browse the repository at this point in the history