git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python3 - 2to3 + miscell obvious tweaks
[sfa.git]
/
sfa
/
util
/
sfalogging.py
diff --git
a/sfa/util/sfalogging.py
b/sfa/util/sfalogging.py
index
5a9745c
..
fd1cabf
100644
(file)
--- a/
sfa/util/sfalogging.py
+++ b/
sfa/util/sfalogging.py
@@
-1,4
+1,4
@@
-#!/usr/bin/
python
+#!/usr/bin/
env python3
"""
A reroutable logger that can handle deep tracebacks
"""
A reroutable logger that can handle deep tracebacks
@@
-34,7
+34,7
@@
Implementation:
# pylint: disable=c0111, c0103, w1201
# pylint: disable=c0111, c0103, w1201
-from __future__ import print_function
+
import os
import os.path
import os
import os.path
@@
-123,7
+123,7
@@
def logging_config(context):
if context == 'server':
handlername = 'file'
filename = '/var/log/sfa.log'
if context == 'server':
handlername = 'file'
filename = '/var/log/sfa.log'
- level = '
INFO
'
+ level = '
DEBUG
'
elif context == 'import':
handlername = 'file'
filename = '/var/log/sfa-import.log'
elif context == 'import':
handlername = 'file'
filename = '/var/log/sfa-import.log'
@@
-168,7
+168,7
@@
def logging_config(context):
'level': level,
'formatter': 'standard',
'class': 'logging.StreamHandler',
'level': level,
'formatter': 'standard',
'class': 'logging.StreamHandler',
-
}
+ }
else:
config['handlers']['file'] = {
'filename': filename,
else:
config['handlers']['file'] = {
'filename': filename,
@@
-179,7
+179,7
@@
def logging_config(context):
'when': 'w0',
'interval': 1,
'backupCount': 12,
'when': 'w0',
'interval': 1,
'backupCount': 12,
-
}
+ }
return config
return config