Closed carlosm27 closed 2 years ago
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.
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)
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!
Fix typo mentioned in the issue #66