zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.24k stars 362 forks source link

Improper cloudwatch_log_level setting results in silently defaulting to "OFF" #1004

Closed nzneit closed 4 months ago

nzneit commented 3 years ago

Context

Silently defaulting cloudwatch_log_level to "OFF" can provide a confusing experience for users when they misconfigure the setting.

Expected Behavior

Warn user of their improper configuration of cloudwatch_log_level and then continue with previous behavior. This would be a non-breaking change that can provide a user insight into their misconfiguration.

Actual Behavior

cloudwatch_log_level setting results in silently defaulting to "OFF" when misconfigured.

Possible Fix

Warn the user of their improper config. Right around here would be a good spot for a logger.warn or something of the sort. e.g.

logger.warn(f'cloudwatch_log_level: ({cloudwatch_log_level}), defaulting to "OFF". Supported log levels are: {self.cloudwatch_log_level}')

Steps to Reproduce

  1. In zappa_settings.json set cloudwatch_log_level to something like "DEBUG" or "CRITICAL"
  2. Simply deploy a demo app via deploy or update

Your Environment

github-actions[bot] commented 5 months ago

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

github-actions[bot] commented 4 months ago

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.