Ignore Logs

When using AppSignal Logging, log lines emitted using the AppSignal Integrations can be filtered using our "ignore logs" denylist.

Ignoring log lines allows you to remove noise from the logs you view in AppSignal, keeping only those log lines that are meaningful to you. Ignored log lines are not sent to AppSignal, and are not counted towards your log storage quota.

Ignoring logs

To ignore logs you can configure an "ignore logs" denylist in your AppSignal integration configuration. By adding log messages to this list the integrations will filter out log lines containing those messages from data sent to AppSignal.

This guide will show you how to configure your ignore errors denylist based on what language your application uses:

Log message matching syntax

A log line will be ignored if its message contains any of the messages in the "ignore logs" denylist. For example, an ignore logs entry with the word start will ignore log lines whose messages are "Process started" or "Process failed to start".

A limited subset of regular expression syntax can be used to narrow the log lines accepted:

  • ^ will match the beginning of the message
  • $ will match the end of the message
  • .* will match any characters

No other regular expression syntax is supported.

For example, ^job will match any log line whose message starts with "job", like "job #123 completed successfully", but it will not ignore any log lines that contain "job" at any other position in the message.

Similarly, completed successfully$ will ignore a log line whose message ends with the words "completed successfully", but it will not ignore any log lines that contain "completed successfully" at any other position in the message.

Finally, ^job .* completed successfully$ allows you to ignore log lines that start with "job" and finish with "completed successfully", regardless of what the log message contains in between those words.

Log message matching is case-sensitive, meaning that ignoring job (lowercase j) does not ignore the log message "Job completed" (uppercase J).

Ruby

To ignore logs in Ruby, add the following to your AppSignal configuration file. The ignore_logs value is an Array of Strings.

yaml
# Example: config/appsignal.yml production: ignore_logs: - "^done$" - "Task .* completed successfully"

Read More

Elixir

To ignore logs in Elixir, add the following to your AppSignal configuration file. The ignore_logs value is a List of Strings.

elixir
# Example: config/appsignal.exs config :appsignal, :config, ignore_logs: ["^done$", "Task .* completed successfully"]

Read More

Node.js

To ignore logs in Node.js, add the following to your AppSignal configuration file. The ignoreLogs value is an Array of Strings.

javascript
// Example: appsignal.cjs const { Appsignal } = require("@appsignal/nodejs"); new Appsignal({ // Other config ignoreLogs: ["^done$", "Task .* completed successfully"], });

Read More