logging filemode = w

This commit is contained in:
Schrolli 2015-05-18 12:17:06 +02:00
parent 817f578f88
commit 200c0e65fa
3 changed files with 8 additions and 41 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
*.psd
*.psd
*.pyc

View file

@ -1,42 +1,8 @@
18.05.2015 12:00:39 - INFO: Alarm!
18.05.2015 12:00:39 - DEBUG: Loading plugin template
18.05.2015 12:00:39 - DEBUG: Throw Template Plugin
18.05.2015 12:00:40 - INFO: Alarm!
18.05.2015 12:00:40 - DEBUG: Loading plugin template
18.05.2015 12:00:40 - DEBUG: Throw Template Plugin
18.05.2015 12:00:41 - INFO: Alarm!
18.05.2015 12:00:41 - DEBUG: Loading plugin template
18.05.2015 12:00:41 - DEBUG: Throw Template Plugin
18.05.2015 12:00:42 - INFO: Alarm!
18.05.2015 12:00:42 - DEBUG: Loading plugin template
18.05.2015 12:00:42 - DEBUG: Throw Template Plugin
18.05.2015 12:01:58 - INFO: Alarm!
18.05.2015 12:01:58 - DEBUG: Loading plugin template
18.05.2015 12:01:58 - DEBUG: Throw Template Plugin
18.05.2015 12:01:58 - DEBUG: try 5/0
18.05.2015 12:02:09 - INFO: Alarm!
18.05.2015 12:02:09 - DEBUG: Loading plugin template
18.05.2015 12:02:09 - DEBUG: Throw Template Plugin
18.05.2015 12:02:09 - DEBUG: try 5/0
18.05.2015 12:02:09 - ERROR: Error in Template Plugin
Traceback (most recent call last):
File "./plugins\template\__init__.py", line 7, in run
test = 5/0
ZeroDivisionError: division by zero
18.05.2015 12:02:10 - INFO: Alarm!
18.05.2015 12:02:10 - DEBUG: Loading plugin template
18.05.2015 12:02:10 - DEBUG: Throw Template Plugin
18.05.2015 12:02:10 - DEBUG: try 5/0
18.05.2015 12:02:10 - ERROR: Error in Template Plugin
Traceback (most recent call last):
File "./plugins\template\__init__.py", line 7, in run
test = 5/0
ZeroDivisionError: division by zero
18.05.2015 12:02:11 - INFO: Alarm!
18.05.2015 12:02:11 - DEBUG: Loading plugin template
18.05.2015 12:02:11 - DEBUG: Throw Template Plugin
18.05.2015 12:02:11 - DEBUG: try 5/0
18.05.2015 12:02:11 - ERROR: Error in Template Plugin
18.05.2015 12:15:05 - INFO: Alarm!
18.05.2015 12:15:05 - DEBUG: Loading plugin template
18.05.2015 12:15:05 - DEBUG: Throw Template Plugin
18.05.2015 12:15:05 - DEBUG: try 5/0
18.05.2015 12:15:05 - ERROR: Error in Template Plugin
Traceback (most recent call last):
File "./plugins\template\__init__.py", line 7, in run
test = 5/0

View file

@ -5,7 +5,7 @@ import time
import pluginloader
import logging
logging.basicConfig(filename='boswatch.log',level=logging.DEBUG, format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%d.%m.%Y %I:%M:%S')
logging.basicConfig(filename='boswatch.log', filemode='w', level=logging.DEBUG, format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%d.%m.%Y %I:%M:%S')
#https://docs.python.org/2/howto/logging.html#logging-basic-tutorial
#log levels