Celery: Hide extra kwargs
amns13 opened this issue · 1 comments
amns13 commented
When any celery task is finished, Celery prints a log saying that the task succeeded in . It also adds extra information containing the parameters received for the task.
logger.info(fmt, context, extra={'data': context})
As the input parameters can contain sensitive information, we don't want to print this info. Is there anyway that we can hide this in the logs?
amns13 commented
Okay. I inherited from JsonFormatter
and overrode __init__
to add data
to _skip_fields
. Still, please let me know if there's a better way. TIA