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()}))
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')
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")