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:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user