Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9337011
D1357.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D1357.diff
View Options
diff --git a/swh/journal/cli.py b/swh/journal/cli.py
--- a/swh/journal/cli.py
+++ b/swh/journal/cli.py
@@ -48,8 +48,7 @@
format='%(asctime)s %(levelname)s %(name)s %(message)s',
)
- _log = logging.getLogger('kafka')
- _log.setLevel(logging.INFO)
+ logging.getLogger('kafka').setLevel(logging.INFO)
ctx.obj['config'] = conf
ctx.obj['loglevel'] = log_level
diff --git a/swh/journal/client.py b/swh/journal/client.py
--- a/swh/journal/client.py
+++ b/swh/journal/client.py
@@ -3,8 +3,6 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
-import logging
-
from abc import ABCMeta, abstractmethod
from collections import defaultdict
from kafka import KafkaConsumer
@@ -12,7 +10,6 @@
from swh.core.config import SWHConfig
from .serializers import kafka_to_key, kafka_to_value
-
# Only accepted offset reset policy accepted
ACCEPTED_OFFSET_RESET = ['earliest', 'latest']
@@ -73,8 +70,6 @@
if extra_configuration:
self.config.update(extra_configuration)
- self.log = logging.getLogger('swh.journal.client.JournalClient')
-
auto_offset_reset = self.config['auto_offset_reset']
if auto_offset_reset not in ACCEPTED_OFFSET_RESET:
raise ValueError(
diff --git a/swh/journal/direct_writer.py b/swh/journal/direct_writer.py
--- a/swh/journal/direct_writer.py
+++ b/swh/journal/direct_writer.py
@@ -59,7 +59,7 @@
topic = '%s.%s' % (self._prefix, object_type)
key = self._get_key(object_type, object_)
object_ = self._sanitize_object(object_type, object_)
- logger.debug('topic: %s, key: %s, value: %s' % (topic, key, object_))
+ logger.debug('topic: %s, key: %s, value: %s', topic, key, object_)
self.send(topic, key=key, value=object_)
write_update = write_addition
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 7:50 AM (10 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217637
Attached To
D1357: Fix logging configuration and harmonize loggers use
Event Timeline
Log In to Comment