You can configure log handlers to send messages to a remote logging server. A log handler pushes build and deploy logs to other systems, similarly to the way you push logs to Slack and email. You can enable a syslog handler, which is ideal for logging messages related to hardware, or a Graylog Extended Log Format (GELF) handler, which is ideal for logging messages from software applications.
The following example configures both of these handlers by adding the configuration to the
.magento.env.yaml file. For the minimum logging level (
min_level) values, see Log levels.
log: syslog: ident: "<syslog-ident>" facility: 8 # https://php.net/manual/en/network.constants.php min_level: "info" logopts: <syslog-logopts> syslog_udp: host: "<syslog-host>" port: <syslog-port> facility: 8 # https://php.net/manual/en/network.constants.php ident: "<syslog-ident>" min_level: "info" gelf: min_level: "info" use_default_formatter: true additional: # Some additional information for each log message project: "<some-project-id>" app_id: "<some-app-id>" transport: http: host: "<http-host>" port: <http-port> path: "<http-path>" connection_timeout: 60 tcp: host: "<tcp-host>" port: <tcp-port> connection_timeout: 60 udp: host: "<udp-host>" port: <udp-port> chunk_size: 1024
Log levels determine the level of detail in notification messages. The following log level categories include every log level below it. For example, a
debug level includes logging from every level, whereas an
alert level only shows alerts and emergencies.