Logging enhancements
@sadielbartholomew is already working on this.
Since May 19, 2020.
Assessment
This issue has not been assessed yet.
Description
Follow-on from #31. Now the infrastructure for logging is in place, we can make good use of it with some extensions [feel free to add to this listing, anyone!]:
-
#31 did not add new logging calls, it simply replaced print calls existing at that point, which only existed on any
equalsmethods &readorwritefunctions. We should:- add meaningful messages across the codebase at applicable levels;
- add a
verbosekwarg to any function that ends up with a significant amount of log calls.
-
Improved display in log calls of objects for readability. For example, using
pprint.pformatto print dictionary or list structures with an item per line, to make it easy to pick out a particular item especially where the structure has many items so it would otherwise be difficult. I have already changed a few messages inread_write.netcdf.netcdfreadas such, e.g: -
Currently log messages go, as the equivalent
print()statements did, to STDOUT as pure messages i.e. no extra metadata such as datetime stamps are included, just log level, logger name, & the message itself. However I think it would be beneficial to have at least one new handler to provide (all logging messages plus) (date)time stamps, calls made by the user, and exceptions which get raised outside of the logging system.I think a file handler is best such that the user can specify a path where a named dedicated log file gets written out (& rolled if there is the potential for it to get large enough) with every possible detail (i.e. set
cfdm.LOG_LEVEL('DEBUG')for that handler). This would be great for user support & debugging purposes.- for this handler, add functionality to print timestamped calls that are run by the user (not just the log messages themselves).
- Dominant language
- Python
- Stars
- 32
- Forks
- 14
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from NCAS-CMS/cfdm
-
Convert to/from iris cubesPossibly taken @davidhassell claimed this 4 days ago. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Convert from/to `xarray`Possibly taken @davidhassell claimed this 6 days ago. Opendataset read dataset write enhancement xarray
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Conformance: UGRID check failure reporting missing attrMay be free again @sadielbartholomew claimed this 66 days ago, and no pull request is open. Openbug UGRID
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
blacklanternsecurity/bbot#3679 ·
Maintainers usually reply within 2 days
-
Link Checker ReportOpenBot Type: Bug Type: Documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day