My Celery log consistently truncates (not very) long error messages, like this:
[2012-04-08 04:53:10,084: INFO/MainProcess] Task mainapp.tasks.async_submitter[2df2fe93-156b-4944-9ecf-c55ba53e8aaa] succeeded in 0.190640926361s: 'An error occurred during the submission of...
Needless to say, this removes half the purpose of logging. How can I stop this from happening?
I'm running celery with django-celery (through django-supervisor with supervisor) on linux.
Unfortunately, Celery will truncate messages by default yes.
From version 3.1.7 to 3.1.9 it seems to be possible to tweak this limit by patching a module's global:
import celery.worker.job
celery.worker.job.RESULT_MAXLEN = 1048576 # 1 Mib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With