API Proposal for Logging
See original GitHub issueBy default writing to a logger would not go to STDOUT without a handler. One solution to this is to attach a handler when verbose is an integer and use the logger if it is passed in.
# Do not log
func(verbose=0)
# will create a stream handler to stdout
func(verbose=1)
# will write to the logger passed in
func(verbose=logger)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Logging API proposal - MoodleDocs
This proposal address the problem that Moodle currently stores all log information in a database table. Problem. The current Moodle logging API ......
Read more >Proposal: Structured Logging
This proposal contains such an API. We also propose generalizing the logging “backend.” The log package provides control only over the io.
Read more >[Feedback] Server Logging API (with revisions) - Proposals
Logging metadata is now structures and now supports nested dictionaries and list values, in addition to strings of course. only locally relevant ...
Read more >Logging Enhancements Project Proposal - ONAP Wiki
Project Name; Why a Logging Project; Project Description; Scope ... R4, ELK stack provides for tracing, dashboards, query API ... Proposals include:.
Read more >Proposal for Logging Library Package - Apache Commons
However, there are many logging APIs out there and it is difficult to choose among them. The Logging package will be an ultra-thin...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good point. In this case we do not need to accept
verbose=logger
. A advanced user can still attach a handler to the global logger. (or the logger at the module level)I still think it is useful to have an integer for verbosity.
Since none of the models currently use logging, maybe this is rather a stdout vs stderr issue. I’ll try to investigate.