Skip to content

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Feb 8, 2023

🗣 Description

This pull request adds the ability to configure the logging level for a Lambda invocations by setting the log_level environment variable in its environment. It also adds a missing development dependency.

⚠ Note

This is built on top of the current lineage/skeleton branch to ease merging.

💭 Motivation and context

Providing a way to change logging level (notably for debugging) is good to have for any tool. Since you may only want it for a single invocation or period of time it makes sense to adjust it on a per-invocation basis.

We need the semver package to successfully use the bump_version.sh script.

🧪 Testing

Automated tests pass. I started the image locally and checked that appropriate logging messages were in the Compose logs based on the configuration given to the image.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Finalize version.

✅ Post-merge checklist

  • Add a tag or create a release.

@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release labels Feb 8, 2023
@mcdonnnj mcdonnnj self-assigned this Feb 8, 2023
mcdonnnj added 4 commits March 2, 2023 10:36
Add the ability to configure the logging level for a given invocation
of the Lambda. We use an environment variable to also highlight how a
Lambda might be configured to run with a specific configuration. This
environment variable will change the logging level for a given
invocation of the Lambda and then reset it to the previous level.
The `semver` package was not in the develop requirements even though it
is required by the bump_version.sh script.
@jmorrowomni jmorrowomni force-pushed the improvement/allow_configurable_logging branch from 5669883 to 16901db Compare March 2, 2023 15:37
@jmorrowomni jmorrowomni requested review from dav3r and jsf9k March 2, 2023 15:46
@jmorrowomni jmorrowomni assigned jmorrowomni and unassigned mcdonnnj Mar 2, 2023
@jmorrowomni jmorrowomni merged commit e8fed7e into develop Mar 2, 2023
@jmorrowomni jmorrowomni deleted the improvement/allow_configurable_logging branch March 2, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement This issue or pull request will add or improve functionality, maintainability, or ease of use kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release

Projects

Development

Successfully merging this pull request may close these issues.

4 participants