This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
There are two ways in which you can configure logging for Galaxy servers:
Basic/automatic configuration with control over log level and log destination (standard output or a named log file).
By default, Galaxy logs all messages to standard output at the
DEBUG logging level, unless the
is passed to
run.sh, in which case, output is logged to a location configured in `gravity`_.
Gravity and related terminology are explained in detail in the Scaling and Load Balancing documentation.
Basic logging configuration can be used to modify the level of log messages and the file to which Galaxy logs. The level
is controlled by the
log_level configuration option.
If not set, Galaxy logs all messages at the
DEBUG level (versions prior to 18.01 defaulted to
INFO if unset, but
the default config file shipped with
log_level explicitly set to
DEBUG for development purposes).
Galaxy logs all messages to standard output by default if running in the foreground. If running in the background, the log is written to a location configured in `gravity`_.
Setting the log level:
galaxy: log_level: LEVEL
Logging to a file:
To change the log file name or location, use the
$GALAXY_LOG environment variable like so:
$ GALAXY_LOG=/path/to/galaxy/logfile sh run.sh --daemon
For more useful and manageable logging when running Galaxy with forking application stacks where multiple
Galaxy server processes are forked after the Galaxy application is loaded, a custom
filename_template config option
is available to
logging.FileHandler (or derivative class) log handler definitions so that multiple file logging is possible.
Without this custom option, all forked Galaxy server processes would only be able to log to a single combined log file,
which can be very difficult to work with.
Advanced logging configuration is performed under the
logging key in the
galaxy section of
syntax is a YAML dictionary in the syntax of Python’s
logging.config.dictConfig(). This section covers a few of
the most common configurations as well as Galaxy’s customizations. Consult the
documentation for a complete explanation of the syntax and possibilities.
The default as of this Galaxy release can be found (in Python syntax) in the
galaxy.config.LOGGING_CONFIG_DEFAULT constant and (in YAML) below:
galaxy: logging: disable_existing_loggers: false filters: stack: (): galaxy.web_stack.application_stack_log_filter formatters: stack: (): galaxy.web_stack.application_stack_log_formatter handlers: console: class: logging.StreamHandler filters: - stack formatter: stack level: DEBUG stream: ext://sys.stderr loggers: amqp: level: INFO qualname: amqp botocore: level: INFO qualname: botocore paste.httpserver.ThreadPool: level: WARN qualname: paste.httpserver.ThreadPool routes.middleware: level: WARN qualname: routes.middleware sqlalchemy_json.track: level: WARN qualname: sqlalchemy_json.track urllib3.connectionpool: level: WARN qualname: urllib3.connectionpool root: handlers: - console level: DEBUG version: 1