Skip to content

Feature/39 logging example#215

Open
ChrsBaur wants to merge 2 commits intomasterfrom
feature/39-logging-example
Open

Feature/39 logging example#215
ChrsBaur wants to merge 2 commits intomasterfrom
feature/39-logging-example

Conversation

@ChrsBaur
Copy link
Copy Markdown
Contributor

@ChrsBaur ChrsBaur commented May 3, 2026

Centralised logging setup (closes #39): all config variants now expose a single util.setup_logging() function so main.py is uniform regardless of the chosen config format. util__yaml.py and util__hocon.py gain a setup_logging() wrapper; a new util__none.py provides a standalone setup_logging() for the no-config case (renamed to util.py by the post-generate hook).

ChrsBaur added 2 commits May 4, 2026 01:18
Replaces the bare print() stub with a logging-aware example:
- With a config file: loads config and calls util.logging_setup()
- Without config: falls back to logging.basicConfig(INFO)
Both paths emit a logger.info message so the generated project
demonstrates end-to-end logging from the very first run.
…g variants (closes #39)

All three config options (yaml, hocon, none) now expose setup_logging() so
main.py can call util.setup_logging() unconditionally. Added util__none.py
for the no-config case (renamed to util.py by the post-gen hook); updated
handle_config() to delete the unused util__* variants; updated tests.
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.

1 participant