Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Push Celery logs to syslog, for real this time.
Browse files Browse the repository at this point in the history
On a personal note: VICTORY.
  • Loading branch information
James Socol committed Dec 10, 2010
1 parent 1230d59 commit 77760ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 5 additions & 6 deletions log_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from django.conf import settings

import celery.conf
import celery.log


Expand All @@ -29,9 +30,7 @@
log.addHandler(handler)

if not settings.DEBUG:
task_log = logging.getLogger('k.task')
task_proxy = celery.log.LoggingProxy(task_log, level)
task_format = ('%s: [%%(asctime)s: %%(levelname)s/%%(processName)s] '
'%%(message)s' % settings.SYSLOG_TAG)
celery.log.setup_logger(logfile=task_proxy, loglevel=level,
colorize=False)
task_log = logging.getLogger('k.celery')
task_proxy = celery.log.LoggingProxy(task_log)
celery.conf.CELERYD_LOG_FILE = task_proxy
celery.conf.CELERYD_LOG_COLOR = False
3 changes: 3 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ def read_only_mode(env):
CELERY_RESULT_BACKEND = 'amqp'
CELERY_IGNORE_RESULT = True
CELERY_ALWAYS_EAGER = True # For tests. Set to False for use.
CELERY_SEND_TASK_ERROR_EMAILS = True
CELERYD_LOG_LEVEL = logging.INFO
CELERYD_CONCURRENCY = 4

# Wiki rebuild settings
WIKI_REBUILD_TOKEN = 'sumo:wiki:full-rebuild'
Expand Down

0 comments on commit 77760ab

Please sign in to comment.