diff options
author | lassulus <lassulus@lassul.us> | 2023-01-19 14:12:03 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2023-01-19 14:12:03 +0100 |
commit | c89f76a0bd4f5060ead3d942387c37aff1350ec8 (patch) | |
tree | 6715b9053f54a97a5b72a4dd8a06a865326b5a91 /makefu/5pkgs/HermesLedControl/remove-logger.patch | |
parent | b51998cfae7b6fe892f9f0f9a2c0ffcfeeded0ba (diff) | |
parent | cb7ebd1c9120eb03ded2334db4c41fe6a0e26b88 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/5pkgs/HermesLedControl/remove-logger.patch')
-rw-r--r-- | makefu/5pkgs/HermesLedControl/remove-logger.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/makefu/5pkgs/HermesLedControl/remove-logger.patch b/makefu/5pkgs/HermesLedControl/remove-logger.patch new file mode 100644 index 000000000..a6b757d35 --- /dev/null +++ b/makefu/5pkgs/HermesLedControl/remove-logger.patch @@ -0,0 +1,31 @@ +diff --git a/main.py b/main.py +old mode 100644 +new mode 100755 +index 9b5a269..350d443 +--- a/main.py ++++ b/main.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/env python3 + from logging import handlers + + import logging +@@ -17,18 +18,6 @@ _logger.setLevel(logging.DEBUG) + + date = int(datetime.now().strftime('%Y%m%d')) + +-handler = logging.FileHandler(filename='logs.log', mode='w') +-rotatingHandler = handlers.RotatingFileHandler(filename=f'./logs/{date}-logs.log', mode='a', maxBytes=100000, backupCount=5) +-streamHandler = logging.StreamHandler() +- +-handler.setFormatter(formatter) +-rotatingHandler.setFormatter(formatter) +-streamHandler.setFormatter(formatter) +- +-_logger.addHandler(handler) +-_logger.addHandler(rotatingHandler) +-_logger.addHandler(streamHandler) +- + + def stopHandler(_signum, frame): + onStop() + |