backtrace=False, but loguru is still showing tracebacks on exceptions
See original GitHub issuelogger.add("/var/log/protectwise_bootstrap.log", backtrace=False, format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}")
backtrace=False, but loguru is still showing tracebacks on exceptions
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Python - loguru disable traceback on exceptions
The backtrace attribute controls the length of the traceback (if enabled, Loguru displays the entire traceback instead of stopping at the ...
Read more >Changelog - loguru documentation
Make the record["exception"] attribute unpackable as a (type, value, traceback) tuple. Fix error happening in some rare circumstances because ...
Read more >A Complete Guide to Logging in Python with Loguru
backtrace : determines whether the exception trace should extend beyond the point where the error is captured, making it easier to debug.
Read more >A quick guide to using Loguru - Medium
Not only does it serve as a pseudo-documentation, but it can also be a lifesaver. Returning the right log messages at the right...
Read more >python-logstash-async from eht16 - GithubHelp
from loguru import logger from logstash_async.handler import ... I want to send environment name with all messages but not able to send it, ......
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
Hi.
I guess you have two configured handlers: the first one logs messages to
sys.stderr
(this is the default handler automatically added), the second one logs messages to"protectwise_bootstrap.log"
(the handler you manually added).The
backtrace
properties of handlers are independent of each others. The default handler usebacktrace=True
. So, even if you add a new handler withlogger.add(..., backtrace=False)
, the default one is not modified and will display full traceback.You can either set
LOGURU_BACKTRACE=NO
for development, or explicitly add asys.stderr
handler withbacktrace=False
:Alternatively, using
configure()
:Thanks for your help. Really really lovely loggly module.