docs/src/main/sphinx/admin/properties-logging.md
log.annotation-fileprop-type-stringAn optional properties file that contains annotations to include with each log
message for TCP output or file output in JSON format, defined with log.path
and log.format. This can be used to include machine-specific or
environment-specific information into logs which are centrally aggregated. The
annotation values can contain references to environment variables.
environment=production
host=${ENV:HOSTNAME}
log.formatprop-type-stringTEXTThe file format for log records. Can be set to either TEXT or JSON. When
set to JSON, the log record is formatted as a JSON object, one record per
line. Any newlines in the field values, such as exception stack traces, are
escaped as normal in the JSON object. This allows for capturing and indexing
exceptions as singular fields in a logging search system.
log.console-formatprop-type-stringTEXTThe format for log records written to the console output, set to either TEXT
or JSON. When set to JSON, the log record is formatted as a JSON object, one
record per line. Any newlines in the field values, such as exception stack
traces, are escaped as normal in the JSON object. This allows for capturing and
indexing exceptions as singular fields in a logging search system when using
console output and capturing it, as commonly configured in containers.
log.pathprop-type-stringThe path to the log file used by Trino. The path is relative to the data
directory, configured to var/log/server.log by the launcher script as
detailed in {ref}running-trino. Alternatively, you can write logs to separate
the process (typically running next to Trino as a sidecar process) via the TCP
protocol by using a log path of the format tcp://host:port.
log.max-sizeprop-type-data-size100MBThe maximum file size for the general application log file.
log.max-total-sizeprop-type-data-size1GBThe maximum file size for all general application log files combined.
log.compressionprop-type-stringGZIPThe compression format for rotated log files. Can be set to either GZIP or NONE. When
set to NONE, compression is disabled.
http-server.log.enabledprop-type-booleantrueFlag to enable or disable logging for the HTTP server.
http-server.log.compression.enabledprop-type-booleantrueFlag to enable or disable compression of the log files of the HTTP server.
http-server.log.pathprop-type-stringvar/log/http-request.logThe path to the log file used by the HTTP server. The path is relative to
the data directory, configured by the launcher script as detailed in
{ref}running-trino.
http-server.log.max-historyprop-type-integer15The maximum number of log files for the HTTP server to use, before log rotation replaces old content.
http-server.log.max-sizeprop-type-data-sizeunlimitedThe maximum file size for the log file of the HTTP server. Defaults to
unlimited, setting a {ref}prop-type-data-size value limits the file size
to that value.