Skip to content

Feature/712 add logging#713

Open
ArBridgeman wants to merge 7 commits intomainfrom
feature/712-add-logging
Open

Feature/712 add logging#713
ArBridgeman wants to merge 7 commits intomainfrom
feature/712-add-logging

Conversation

@ArBridgeman
Copy link
Collaborator

@ArBridgeman ArBridgeman commented Feb 17, 2026

closes #712

Checklist

Note: If any of the items in the checklist are not relevant to your PR, just check the box.

For any Pull Request

Is the following correct:

  • the title of the Pull Request?
  • the title of the corresponding issue?
  • there are no other open Pull Requests for the same update/change?
  • that the issue which this Pull Request fixes ("Fixes...") is mentioned?

When Changes Were Made

Did you:

  • update the changelog?
  • update the cookiecutter-template?
  • update the implementation?
  • check coverage and add tests: unit tests and, if relevant, integration tests?
  • update the User Guide & other documentation?
  • resolve any failing CI criteria (incl. Sonar quality gate)?

When Preparing a Release

Have you:

  • thought about version number (major, minor, patch)?
  • checked Exasol packages for updates and resolved open vulnerabilities, if easily possible?

@ArBridgeman ArBridgeman marked this pull request as draft February 17, 2026 14:53

@classmethod
def load_from_template(cls, file_path: Path, github_template_dict: dict[str, Any]):
bind_contextvars(template_file_name=file_path.name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended, that this doesn't get cleared when the not file_path.exists(): fails?

Copy link
Collaborator Author

@ArBridgeman ArBridgeman Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it was an oversight. Still popping off parts from the OG PR ;)

log_level = os.getenv("LOG_LEVEL", "INFO").upper()

structlog.configure(
wrapper_class=structlog.make_filtering_bound_logger(getattr(logging, log_level))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok you only wrap normal logging and don't use the json logging. This should be the best for PTB. It is mainly read by humans.

@ArBridgeman ArBridgeman marked this pull request as ready for review February 18, 2026 08:08
@sonarqubecloud
Copy link

@ArBridgeman ArBridgeman requested a review from tkilias February 18, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structlog

2 participants