你正在阅读 Celery 3.1 的文档。开发版本文档见: 此处.

celery.app.log

celery.app.log

The Celery instances logging section: Celery.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)[源代码]
format(record)[源代码]
class celery.app.log.Logging(app)[源代码]
already_setup = False
colored(logfile=None, enabled=None)[源代码]
get_default_logger(name='celery', **kwargs)[源代码]
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.

参数:
  • logger – The logging.Logger instance to redirect to.
  • loglevel – The loglevel redirected messages will be logged as.
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)[源代码]
setup_logger(name='celery', *args, **kwargs)[源代码]

Deprecated: No longer used.

setup_logging_subsystem(loglevel=None, logfile=None, format=None, colorize=None, **kwargs)[源代码]
setup_task_loggers(loglevel=None, logfile=None, format=None, colorize=None, propagate=False, **kwargs)[源代码]

Setup the task logger.

If logfile is not specified, then sys.stderr is used.

Will return the base task logger object.

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

上一个主题

celery.app.builtins

下一个主题

celery.app.utils

本页