celery.app.log

    Sets up logging for the worker and other programs, redirects stdouts, colors log output, patches logging related compatibility fixes, and so on.

    class celery.app.log.TaskFormatter(fmt=None, use_color=True)

    class celery.app.log.Logging(app)

    • already_setup = False

    • redirect_stdouts(loglevel=None, name=’celery.redirected’)

    • redirect_stdouts_to_logger(logger, loglevel=None, stdout=True, stderr=True)[源代码]

      Redirect sys.stdout and sys.stderr to a logging instance.

    • setup(loglevel=None, logfile=None, redirect_stdouts=False, redirect_level=’WARNING’, colorize=None)

    • setup_handlers(logger, logfile, format, colorize, formatter=<class ‘celery.utils.log.ColorFormatter’>, \*kwargs*)[源代码]

    • Deprecated: No longer used.

    • setup_logging_subsystem(loglevel=None, logfile=None, format=None, colorize=None, \*kwargs*)

    • supports_color(colorize=None, logfile=None)[源代码]