app.log

Logging configuration.

The Celery instances logging section: Celery.log.

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

Module Contents

Classes

TaskFormatter() Formatter for tasks, adding the task name and id.
Logging(self,app) Application logging setup (app.log).
class TaskFormatter

Formatter for tasks, adding the task name and id.

format(record)
class Logging(app)

Application logging setup (app.log).

__init__(app)
setup(loglevel=None, logfile=None, redirect_stdouts=False, redirect_level="WARNING", colorize=None, hostname=None)
redirect_stdouts(loglevel=None, name="celery.redirected")
setup_logging_subsystem(loglevel=None, logfile=None, format=None, colorize=None, hostname=None, **kwargs)
_configure_logger(logger, logfile, loglevel, format, colorize, **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.

redirect_stdouts_to_logger(logger, loglevel=None, stdout=True, stderr=True)

Redirect sys.stdout and sys.stderr to logger.

Arguments:

logger (logging.Logger): Logger instance to redirect to. loglevel (int, str): The loglevel redirected message

will be logged as.
supports_color(colorize=None, logfile=None)
colored(logfile=None, enabled=None)
setup_handlers(logger, logfile, format, colorize, formatter=ColorFormatter, **kwargs)
_detect_handler(logfile=None)

Create handler from filename, an open stream or None (stderr).

_has_handler(logger)
_is_configured(logger)
setup_logger(name="celery", *args, **kwargs)

Deprecated: No longer used.

get_default_logger(name="celery", **kwargs)
already_setup()
already_setup(was_setup)