This document describes the current stable version of Celery (3.1). For development docs, go here.

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, use_color=True)[source]
already_setup = False[source]
colored(logfile=None, enabled=None)[source]
get_default_logger(name='celery', **kwargs)[source]
redirect_stdouts(loglevel=None, name='celery.redirected')[source]
redirect_stdouts_to_logger(logger, loglevel=None, stdout=True, stderr=True)[source]

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, hostname=None)[source]
setup_handlers(logger, logfile, format, colorize, formatter=<class 'celery.utils.log.ColorFormatter'>, **kwargs)[source]
setup_logger(name='celery', *args, **kwargs)[source]

Deprecated: No longer used.

setup_logging_subsystem(loglevel=None, logfile=None, format=None, colorize=None, hostname=None, **kwargs)[source]
setup_task_loggers(loglevel=None, logfile=None, format=None, colorize=None, propagate=False, **kwargs)[source]

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)[source]

Previous topic

Next topic

This Page