Don't use str.format() when logging.

The correct way to log is to use %-formatting, and pass the format args to
the logging function. This prevents the string from being formatted at all
when the log item isn't logged anywhere (in this case, when the log level
is WARNING or higher).
This commit is contained in:
Sybren A. Stüvel 2017-05-31 11:03:04 +02:00
parent 2c78697e80
commit 34b9be4efa

View File

@ -132,7 +132,7 @@ def index_users_rebuild():
users_index = current_app.algolia_index_users
log.info('Dropping index: {}'.format(users_index))
log.info('Dropping existing index: %s', users_index)
users_index.clear_index()
index_users_update_settings()