From 55fa2598f5848635c93603c0d2f7b840e5e173a3 Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Thu, 2 Apr 2020 17:19:01 +0100 Subject: [PATCH] add logging disabling --- fancylog/fancylog.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fancylog/fancylog.py b/fancylog/fancylog.py index 582ddfe..3cab021 100644 --- a/fancylog/fancylog.py +++ b/fancylog/fancylog.py @@ -276,3 +276,12 @@ def setup_logging( else: logging.info("Starting logging") logging.info("Not logging multiple processes") + + +def disable_logging(): + """ + Prevents any more logging. Saves remembering that logging.disable() with + no argument doesn't work. + :return: + """ + logging.disable(2 ** 63 - 1) \ No newline at end of file