Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123169
D214.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
912 B
Subscribers
None
D214.diff
View Options
diff --git a/swh/scheduler/celery_backend/config.py b/swh/scheduler/celery_backend/config.py
--- a/swh/scheduler/celery_backend/config.py
+++ b/swh/scheduler/celery_backend/config.py
@@ -8,6 +8,7 @@
from celery import Celery
from celery.signals import setup_logging
+from celery.utils.log import ColorFormatter
from celery.worker.control import Panel
from kombu import Exchange, Queue
@@ -45,6 +46,13 @@
root_logger = logging.getLogger('')
root_logger.setLevel(logging.INFO)
+ if loglevel == logging.DEBUG:
+ color_formatter = ColorFormatter(format) if colorize else formatter
+ console = logging.StreamHandler()
+ console.setLevel(logging.DEBUG)
+ console.setFormatter(color_formatter)
+ root_logger.addHandler(console)
+
systemd_journal = JournalHandler()
systemd_journal.setLevel(logging.DEBUG)
systemd_journal.setFormatter(formatter)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 1:19 AM (2 d, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3214289
Attached To
D214: celery: enable console logging on debug loglevel
Event Timeline
Log In to Comment