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: Typo in docs/handbooks/logging.srt #72

Merged
merged 2 commits into from
Aug 10, 2022
Merged

Conversation

carlosm27
Copy link
Contributor

Fix typo mentioned in the issue #66

@Miksus
Copy link
Owner

Miksus commented Aug 10, 2022

Thanks for fixing this hard-to-spot typo!

Mind you changing the logging to logger on those lines as well? The docs incorrectly suggest adding the handler to the root logger instead of the logger that was just created.

@carlosm27
Copy link
Contributor Author

Oh yes, no problem. I think it is just in the "log to CSV file" example right?

Log to CSV file example:

... 
# Adding the repo to the logger

logger = logging.getLogger('rocketry.task')

handler = RepoHandler(repo=repo)

logging.addHander(handler)

In the "log the records to SQL database" example there is no logger created:

...
engine = create_engine("sqlite:///app.db")
repo = SQLRepo(engine=engine, table="tasks", if_missing="create", model=MinimalRecord, id_field="created")

handler = RepoHandler(repo=repo)
logging.addHander(handler)

@Miksus
Copy link
Owner

Miksus commented Aug 10, 2022

Thanks! Ye, meant that one.

It seems the other is slightly incorrect as well (should specify the logger the same way and use that instead of root logger) but I'll merge this one. Thanks again for spending the time to fix this!

@Miksus Miksus merged commit 8684375 into Miksus:master Aug 10, 2022
@Miksus Miksus mentioned this pull request Aug 15, 2022
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.

2 participants