Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P887
Masterwork From Distant Lands
Active
Public
Actions
Authored by
tenma
on Dec 1 2020, 6:26 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/swh/vault/backend.py b/swh/vault/backend.py
index 3009cdd..8712302 100644
--- a/swh/vault/backend.py
+++ b/swh/vault/backend.py
@@ -5,6 +5,7 @@
import collections
from email.mime.text import MIMEText
+import logging
import smtplib
from typing import Any, Dict, List, Optional, Tuple
@@ -22,6 +23,9 @@ from swh.vault.cookers import COOKER_TYPES, get_cooker_cls
from swh.vault.exc import NotFoundExc
from swh.vault.interface import ObjectId
+# logging.basicConfig(level=logging.DEBUG)
+logger = logging.getLogger(__name__)
+
cooking_task_name = "swh.vault.cooking_tasks.SWHCookingTask"
NOTIF_EMAIL_FROM = '"Software Heritage Vault" ' "<bot@softwareheritage.org>"
@@ -74,6 +78,9 @@ class VaultBackend:
"""
def __init__(self, **config):
+ logging.basicConfig(level=logging.DEBUG)
+ logger.debug("TEST debug")
+ logger.error("TEST error")
self.config = config
self.cache = VaultCache(**config["cache"])
self.scheduler = get_scheduler(**config["scheduler"])
@@ -372,6 +379,7 @@ class VaultBackend:
self, obj_type: str, obj_id: ObjectId, raise_notfound=True, db=None, cur=None
):
"""Retrieve a bundle from the cache"""
+ logger.debug("fetch")
hex_id, obj_id = self._compute_ids(obj_id)
available = self.is_available(obj_type, obj_id, cur=cur)
if not available:
Event Timeline
tenma
edited the content of this paste.
(Show Details)
Dec 1 2020, 6:26 PM
2020-12-01 18:26:41 (UTC+1)
tenma
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment