title: Use Python standard logging in Celery
body: <p>I have to implement Celery in a pre-existing system. The previous version of the system already used Python standard logging.</p>
  
  <p>My code is similar to the code below. Process one and process two are non-Celery functions, which are logging everywhere. We are using the logging to track data loss if something bad happens.</p>
  
  <pre><code>@task
  def add(x,y):
      process_one(x,y)
      process_two(x,y)
  </code></pre>
  
  <p>How can I implement Celery and use the Python standard logging instead Celery logging, so our old logging system is not lost?</p>
  
  <p>I have tried to change <code>import logging</code> from Python to: <code>logger = add.get_logger()</code> and pass the <code>logger</code> to all functions, but I don't think it is a good practice. I need another solution.</p>
  
  <p><strong>Update: to add application logging in Celery logging, you can perform:</strong></p>
  
  <pre><code>$ manage.py celeryd -v 2 -B -s celery -E -l debug --traceback \
    --settings=settings --logfile=/(path to your log folder)/celeryd.log
  </code></pre>
  
  <p>With <code>-l</code> (logging) as <code>debug</code>, our application/Python logging is automatically included in our Celery logging: No need to perform <code>logger = add.get_logger()</code>.</p>