@@ -66,7 +66,7 @@ def __init__(
6666 since = now - period
6767 else :
6868 since += 1
69- self ._logger .info ("Using provided {0} timestamp as since ({1} seconds ago)" . format ( since , now - since ) )
69+ self ._logger .info ("Using provided %s timestamp as since (%d seconds ago)" , since , now - since )
7070
7171 self ._since = since
7272 self ._to = now - self .SHORT_DELAY # give logs some time to reach Logstash
@@ -78,9 +78,9 @@ def __init__(
7878 self .format_index (prefix = index_prefix , timestamp = now , sep = index_sep ),
7979 ])
8080
81- self ._logger .info ("Using {} indices" . format ( self ._index ) )
82- self ._logger .info ("Querying for messages from between {} and {}" .
83- format ( self .format_timestamp (self ._since ), self .format_timestamp (self ._to ) ))
81+ self ._logger .info ("Using %s indices" , self ._index )
82+ self ._logger .info ("Querying for messages from between %s and %s" ,
83+ self .format_timestamp (self ._since ), self .format_timestamp (self ._to ))
8484
8585 @staticmethod
8686 def format_index (prefix , timestamp , sep = '-' ):
@@ -274,7 +274,7 @@ def get_aggregations(self, query, group_by, stats_field, percents=(50, 95, 99, 9
274274 # add @timestamp range
275275 body ['query' ]['bool' ]['must' ].append (self ._get_timestamp_filer ())
276276
277- self ._logger .info ("Getting aggregations for {} field when grouped by {}" . format ( group_by , stats_field ) )
277+ self ._logger .info ("Getting aggregations for %s field when grouped by %s" , group_by , stats_field )
278278
279279 res = self ._es .search (
280280 body = body ,
0 commit comments