Skip to main content

Logging

By default, appsignal-wrap will send both the standard output and standard error of the process it monitors as logs to AppSignal. The logs will appear under the “application” source, and the name provided as the first argument will be used as the log group.

Disable logging

To disable sending either the standard output or standard error as logs, you can use the --no-stdout or --no-stderr command-line options respectively. To disable sending logs altogether, you can use the --no-log command-line option.

Custom log group

To send logs as a different log group, you can pass it as an argument to the --log command-line option. For example:
appsignal-wrap mysql --log db -- mysqld
In the above example, appsignal-wrap will use db as the log group when sending logs to AppSignal, but will still use mysql as the name to identify the process when reporting process monitors and errors.

Custom log source

To send logs to a different log source, you can pass the log source’s API key, which you obtain when creating a log source, as an argument to the --log-source command-line option, or as the APPSIGNAL_LOG_SOURCE_API_KEY environment variable. For example:
export APPSIGNAL_LOG_SOURCE_API_KEY=[LOG_SOURCE_API_KEY]
appsignal-wrap mysql -- mysqld