diff options
author | Ask Solem <ask@celeryproject.org> | 2012-11-02 14:32:45 +0000 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2012-11-02 14:34:46 +0000 |
commit | 02262aab38c6d9955aaba995bae066655650c3a3 (patch) | |
tree | dd23229c859d4e78f74a036e981312bf7ecb7f80 /examples | |
parent | 5deb7b824011c961fa7774a7de479068af10dcea (diff) | |
download | kombu-02262aab38c6d9955aaba995bae066655650c3a3.tar.gz |
Don't use LogMixin. Closes #169
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simple_task_queue/worker.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/simple_task_queue/worker.py b/examples/simple_task_queue/worker.py index 3d933c4b..be241140 100644 --- a/examples/simple_task_queue/worker.py +++ b/examples/simple_task_queue/worker.py @@ -1,10 +1,13 @@ from __future__ import with_statement from kombu.mixins import ConsumerMixin +from kombu.log import get_logger from kombu.utils import kwdict, reprcall from queues import task_queues +logger = get_logger(__name__) + class Worker(ConsumerMixin): @@ -19,11 +22,11 @@ class Worker(ConsumerMixin): fun = body['fun'] args = body['args'] kwargs = body['kwargs'] - self.info('Got task: %s', reprcall(fun.__name__, args, kwargs)) + logger.info('Got task: %s', reprcall(fun.__name__, args, kwargs)) try: fun(*args, **kwdict(kwargs)) except Exception, exc: - self.error('task raised exception: %r', exc) + logger.error('task raised exception: %r', exc) message.ack() if __name__ == '__main__': |