Cedar (Legacy Platform) applications
Remove old log drains
Before creating a new log drain for AppSignal, you need to remove any pre-existing AppSignal log drains. You can check for any existing active log drains using the command below, wheremyapp is the name of your Heroku application:
<url> above with the URL of the log drain you are trying to remove
Add new log drain
Once any active log drains have been removed, create a Heroku log source in AppSignal:- Go to Logging → Manage sources and select Add log source.
- Enter a Source name, and under Choose your platform, select Heroku Log Drain.
- Under Choose the log message format, keep autodetect, or select the format your app logs in.
- Keep Parse severity from log message checked, so AppSignal reads each line’s severity from the message. See Severity parsing.
- Keep Create a new view with this source checked to get a log view for this source.
- Select Add new source. AppSignal generates an API key for the source.
YOUR_LOG_SOURCE_API_KEY with the key provided when creating a log source.
When connected, logs should appear in AppSignal. If you still cannot see any logs,
please contact us for support.
Severity parsing
By default, Heroku sends all logs with an INFO severity. And since the content of logdrain messages can depend on the source (add-ons, application, Heroku router etc.), there are a couple of ways to override the default severity.Log format
Set a log format and override the severity. You can set the format of your log lines in the source to “logfmt” and emit the following string in your loglineseverity=warning. This will override the default INFO severity to WARNING.
Severity parsing
When you add a Heroku log source in AppSignal, Parse severity from log message is checked by default. Existing sources keep their setting. To change it, go to Logging → Manage sources, open the source, and select Edit source. When Parse severity from log message is checked in the log source you created, we will attempt to parse any valid severity string from the log message. We only do this when the alternatives have not yielded any results (e.g., if you set the source log format tologfmt and emit a severity attribute, that is used instead of the parsed severity).
The following strings are considered valid severities; they can be uppercase, lowercase, or mixed case:
- TRACE
- DEBUG
- INFO
- NOTICE
- WARNING
- WARN
- ERR
- ERROR
- CRIT
- CRITICAL
- ALERT
- EMERG
- PANIC
- FATAL
Shell
Shell
Fir applications
To send logs from your Heroku Fir application to AppSignal, follow the setup steps for Heroku Fir generation applications. AppSignal will automatically ingest logs from your application through OpenTelemetry HTTP exporters, or any logs fromstdout and stderr via a Heroku Telemetry Drain.