Django 芹菜为特定任务写入特定日志文件
如何在django芹菜中为特定任务编写特定的日志文件,我已经在单个日志文件中编写了整个芹菜日志 怎么做Django 芹菜为特定任务写入特定日志文件,django,python-3.x,celery,django-celery,Django,Python 3.x,Celery,Django Celery,如何在django芹菜中为特定任务编写特定的日志文件,我已经在单个日志文件中编写了整个芹菜日志 怎么做 from redington.celery import app from celery import shared_task @app.task(bind=True, name='load_ibm_machine_images') def load_ibm_machine_images(self): """ Task to perform To load soft-layer m
from redington.celery import app
from celery import shared_task
@app.task(bind=True, name='load_ibm_machine_images')
def load_ibm_machine_images(self):
""" Task to perform To load soft-layer machine images """
from cloudapp.management.commands.update_softlayer_machine_types import Command
soft_layer_command_object = Command()
soft_layer_command_object.handle()
return True
提前感谢 您应该深入了解()日志记录configuration@dahrens上面的内容很好,但我只需要特定的任务它写在那里-创建一个单独的记录器,并将此记录器配置为写入一个文件登录中configuration@dahrens以上是好的,但我只需要特定的任务它写在那里-创建一个单独的记录器,并配置此记录器写入一个文件。