summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/mailstore
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@riseup.net>2016-10-19 16:56:43 -0200
committerBruno Wagner <bwagner@riseup.net>2016-10-19 16:56:43 -0200
commit425d6a54e13be2cdcd18f1b21a4ff70ae5d43ff0 (patch)
tree6705d319deaaf9aee234e82c7e0f6815926f17ba /service/pixelated/adapter/mailstore
parentf47533fed69c0ede45285a236bb85efa2938f134 (diff)
Adapted logging in the UA to use twisted.logger
Diffstat (limited to 'service/pixelated/adapter/mailstore')
-rw-r--r--service/pixelated/adapter/mailstore/body_parser.py7
-rw-r--r--service/pixelated/adapter/mailstore/maintenance/__init__.py4
2 files changed, 6 insertions, 5 deletions
diff --git a/service/pixelated/adapter/mailstore/body_parser.py b/service/pixelated/adapter/mailstore/body_parser.py
index 7fb084af..5408bd9d 100644
--- a/service/pixelated/adapter/mailstore/body_parser.py
+++ b/service/pixelated/adapter/mailstore/body_parser.py
@@ -14,11 +14,12 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
-from email.parser import Parser
import re
-import logging
+from email.parser import Parser
+
+from twisted.logger import Logger
-logger = logging.getLogger(__name__)
+logger = Logger()
def _parse_charset_header(content_type_and_charset_header, default_charset='us-ascii'):
diff --git a/service/pixelated/adapter/mailstore/maintenance/__init__.py b/service/pixelated/adapter/mailstore/maintenance/__init__.py
index 5dbe57ad..9a1007cc 100644
--- a/service/pixelated/adapter/mailstore/maintenance/__init__.py
+++ b/service/pixelated/adapter/mailstore/maintenance/__init__.py
@@ -17,7 +17,7 @@ from leap.bitmask.keymanager import documents as leap_doc
from leap.bitmask.keymanager.keys import OpenPGPKey
from twisted.internet import defer
-import logging
+from twisted.logger import Logger
TYPE_OPENPGP_KEY = 'OpenPGPKey'
@@ -25,7 +25,7 @@ TYPE_OPENPGP_ACTIVE = 'OpenPGPKey-active'
KEY_DOC_TYPES = {TYPE_OPENPGP_ACTIVE, TYPE_OPENPGP_KEY}
-logger = logging.getLogger(__name__)
+logger = Logger()
def _is_key_doc(doc):