From 45c046f107be9a5edeb833548065ca63ed9affee Mon Sep 17 00:00:00 2001 From: Vladislav Kaverin Date: Mon, 7 Aug 2017 13:23:08 +0400 Subject: [PATCH] Avoid noisy logging on INFO level. Log about called API on `DEBUG` level, but not `INFO`. Logging such things for every operation, which can be hundreds per second, as `INFO` is a noisy trash in the logs and even an unnecessary information. --- boto3/resources/collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boto3/resources/collection.py b/boto3/resources/collection.py index dec20a84fb..3d8964425e 100644 --- a/boto3/resources/collection.py +++ b/boto3/resources/collection.py @@ -147,7 +147,7 @@ def pages(self): # page in a list. For non-paginated results, we just ignore # the page size parameter. if client.can_paginate(self._py_operation_name): - logger.info('Calling paginated %s:%s with %r', + logger.debug('Calling paginated %s:%s with %r', self._parent.meta.service_name, self._py_operation_name, params) paginator = client.get_paginator(self._py_operation_name) @@ -155,7 +155,7 @@ def pages(self): PaginationConfig={ 'MaxItems': limit, 'PageSize': page_size}, **params) else: - logger.info('Calling %s:%s with %r', + logger.debug('Calling %s:%s with %r', self._parent.meta.service_name, self._py_operation_name, params) pages = [getattr(client, self._py_operation_name)(**params)]