Less logging in normal operations

This commit is contained in:
Stefan Reimer 2019-01-21 15:24:18 +00:00
parent 25c375728a
commit 3a4ec1924b
2 changed files with 11 additions and 5 deletions

View File

@ -76,7 +76,7 @@ class Stack(object):
if 'vars' in _config:
self.template_vars = dict_merge(self.template_vars, _config['vars'])
logger.info("Stack {} added.".format(self.id))
logger.debug("Stack {} added.".format(self.id))
def check_fortytwo(self, template):

View File

@ -53,14 +53,20 @@ def setup_logging(debug):
our_level = logging.DEBUG
# logging.getLogger("botocore").setLevel(logging.INFO)
boto3.set_stream_logger('')
formatter = logging.Formatter(
fmt="[%(asctime)s] %(name)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S"
)
else:
our_level = logging.INFO
logging.getLogger("botocore").setLevel(logging.CRITICAL)
formatter = logging.Formatter(
fmt="[%(asctime)s] - %(name)s - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S"
)
formatter = logging.Formatter(
fmt="[%(asctime)s] %(message)s",
datefmt="%Y-%m-%d %H:%M:%S"
)
log_handler = logging.StreamHandler()
log_handler.setFormatter(formatter)