question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API Proposal for Logging

See original GitHub issue

By 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:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
thomasjpfancommented, Jun 4, 2020

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.

0reactions
rthcommented, Jun 5, 2020

For instance, I think unless one sets the output stream to stdout, in a jupyter notebooks logging will be actually shown in the server logs

Since none of the models currently use logging, maybe this is rather a stdout vs stderr issue. I’ll try to investigate.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found