Better logging when running as Liferea hook
parent
32514941b4
commit
adebe23232
2
morss.py
2
morss.py
|
@ -55,7 +55,7 @@ if 'REQUEST_URI' in os.environ:
|
||||||
def log(txt):
|
def log(txt):
|
||||||
if not 'REQUEST_URI' in os.environ:
|
if not 'REQUEST_URI' in os.environ:
|
||||||
if os.getenv('DEBUG', False):
|
if os.getenv('DEBUG', False):
|
||||||
print txt
|
print repr(txt)
|
||||||
else:
|
else:
|
||||||
with open('morss.log', 'a') as file:
|
with open('morss.log', 'a') as file:
|
||||||
file.write(repr(txt).encode('utf-8') + "\n")
|
file.write(repr(txt).encode('utf-8') + "\n")
|
||||||
|
|
Loading…
Reference in New Issue