Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(taps): Replace hyphens with underscores when generating expected env var name <PLUGIN_NAME>_LOGLEVEL #1308

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ This repo uses the [semantic-prs](https://github.com/Ezard/semantic-prs) GitHub

Pull requests should be named according to the conventional commit syntax to streamline changelog and release notes management. We encourage (but do not require) the use of conventional commits in commit messages as well.

In general, PR titles should follow the format "<type>: <desc>", where type is any one of these:
In general, PR titles should follow the format `<type>: <desc>`, where type is any one of these:

- `ci`
- `chore`
Expand Down
3 changes: 2 additions & 1 deletion singer_sdk/plugin_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def logger(cls) -> logging.Logger:
Plugin logger.
"""
# Get the level from <PLUGIN_NAME>_LOGLEVEL or LOGLEVEL environment variables
LOGLEVEL = os.environ.get(f"{cls.name.upper()}_LOGLEVEL") or os.environ.get(
plugin_env_prefix = f"{cls.name.upper().replace('-', '_')}_"
LOGLEVEL = os.environ.get(f"{plugin_env_prefix}LOGLEVEL") or os.environ.get(
"LOGLEVEL"
)

Expand Down