posit-dev / posit-dev/py-shiny
Enable standard python logging
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
In closed issue #305, @jcheng5 advised against using standard python logging (see below). He comments that "we need to fix up our logging to use logging everywhere". Has this been done, can we now use standard logging? If not, perhaps we should open this as an issue so it can be prioritized and tracked. Sorry if this is already in process or done. Thanks!
OK, I missed the fact that you were calling `logging.basicConfig`. I'd stop doing that for now--we need to fix up our logging to use `logging` everywhere, but for now you should just do this instead, as early as possible:
import sys
logfile = open('myapp.log', 'a', 1)
sys.stdout = logfile
sys.stderr = logfile
I'd do this before importing any other packages, so import errors will be logged.
Originally posted by @jcheng5 in https://github.com/posit-dev/py-shiny/issues/305#issuecomment-1214673651
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current logging setup and the discussion in issue #305, including the referenced import-time logging entry point. Determine whether standard Python logging is used consistently across the project and identify the scope of any remaining work. Done means the project has an agreed, tracked approach for using standard logging everywhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100