예제 #1
0
 def test_cloudwatch_log(self):
     logger = Logger(log_file=os.path.join(TEST_FILE_DIR, "Testing_logger.log"),
                     log_cloudwatch=True)
     logger.info(dict(level="INFO",
                      details={datetime.datetime.now(pytz.utc).isoformat()}))
     logger.error(dict(level="ERROR",
                       details={datetime.datetime.now(pytz.utc).isoformat()}))
     logger.warning(dict(level="WARNING",
                         details={datetime.datetime.now(pytz.utc).isoformat()}))
     logger.critical(dict(level="CRITICAL",
                          details={datetime.datetime.now(pytz.utc).isoformat()}))
예제 #2
0
 def test_log(self):
     logger = Logger(
         log_file=os.path.join(TEST_FILE_DIR, "Testing_logger.log"))
     logger.info('Hi! Your local test log is working')
예제 #3
0
 def test_log(self):
     logger = Logger(
         log_file=os.path.join(TEST_FILE_DIR, "Testing_logger.log"),
         log_cloudwatch=False,
     )
     logger.info("Hi! Your local test log is working")