blob: a6b757d35127e6e1cb1aebdc3746b614e7471b76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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()
|