Browse Source

Less logging in normal operations

master
Stefan Reimer 3 years ago
parent
commit
3a4ec1924b
  1. 2
      cloudbender/stack.py
  2. 14
      cloudbender/utils.py

2
cloudbender/stack.py

@ -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):

14
cloudbender/utils.py

@ -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)

Loading…
Cancel
Save