Better logging when running as Liferea hook

master
pictuga 2013-05-05 15:33:46 +02:00
parent 32514941b4
commit adebe23232
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ if 'REQUEST_URI' in os.environ:
def log(txt):
if not 'REQUEST_URI' in os.environ:
if os.getenv('DEBUG', False):
print txt
print repr(txt)
else:
with open('morss.log', 'a') as file:
file.write(repr(txt).encode('utf-8') + "\n")