summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-09-22 14:44:46 -0300
committerdrebs <drebs@leap.se>2016-09-22 17:57:40 -0300
commitb7340a962bfeae9af28c4b514d0eb077f41dd832 (patch)
treecd9a31d6b955fdff5eadde452089cf718a299af8 /server
parenta7ffb49e1169c93af3b728f5db1a5e16e6231590 (diff)
[feat] centralize logging and use twisted.logger by default
Diffstat (limited to 'server')
-rw-r--r--server/src/leap/soledad/server/auth.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/leap/soledad/server/auth.py b/server/src/leap/soledad/server/auth.py
index ecee2d5d..b7186b3b 100644
--- a/server/src/leap/soledad/server/auth.py
+++ b/server/src/leap/soledad/server/auth.py
@@ -22,13 +22,16 @@ import json
from abc import ABCMeta, abstractmethod
from routes.mapper import Mapper
-from twisted.python import log
+from leap.soledad.common.log import getLogger
from leap.soledad.common.l2db import DBNAME_CONSTRAINTS, errors as u1db_errors
from leap.soledad.common import SHARED_DB_NAME
from leap.soledad.common import USER_DB_PREFIX
+logger = getLogger(__name__)
+
+
class URLToAuthorization(object):
"""
Verify if actions can be performed by a user.
@@ -378,7 +381,7 @@ class SoledadTokenAuthMiddleware(SoledadAuthMiddleware):
try:
return self._state.verify_token(uuid, token)
except Exception as e:
- log.err(e)
+ logger.error(e)
return False
def _get_auth_error_string(self):