don't expand format string params - let the logging module do that

Issue #1520 resolved
Former user created an issue

Instead of expanding format strings like this:

repr(..), str(...), or "foo %s" % (arg,)

rely on the logging module to do that for us. Bonuses include slightly less code and the format strings aren't expanded unless the log line should be generated - good for performance, too.

Comments (5)

  1. Mike Bayer repo owner

    you forgot:

        def log(self, msg, *args):
            self.logger.info(msg, *args)
    

    in pool.py.

    you can run tests with all logging turned on via nosetests --log-debug=sqlalchemy.

    after that the patch is great and in r6962, thanks.

  2. Log in to comment