Logging From Elixir

Configure Package

This feature is designed to work from AppSignal for Elixir integration v2 and greater.

To use logging with your AppSignal integration for Elixir, you first need to install version 2.4 of the package or higher.

Use Logging

Log data must not contain personal data, such as names, email addresses, etc. It is your responsibility to ensure this data is filtered out before being sent to AppSignal, and when identifying a person is necessary that your application uses alternative forms of identification, such as a user ID, hash, or pseudonym.

💡 It’s not currently possible to send application-wide Elixir logs to AppSignal. You can follow the documentation below to send specific log lines to AppSignal.

Once the logging branch has been successfully installed, your Elixir integration will include a new Appsignal.Logger module, which provides eight functions.

Each of these functions correspond to the severity of the log message:

  • debug/3,
  • info/3,
  • notice/3,
  • warning/3,
  • error/3,
  • critical/3,
  • alert/3,
  • emergency/3

These functions accept three arguments in the following order: group, message, and optionally metadata. The examples below show how you can use these arguments in your application when creating new logs:

Appsignal.Logger.debug("app", "Log message line")
Appsignal.Logger.debug("app", "Something went wrong with customer: #{customer_id}", %{customer_id: 123, post_id: 234})

You can query and filter on message contents and attribute values from within the Log Management tool.

Need Help?

After configuring your Elixir application to send logs, logs should appear in AppSignal. If you are unsure about this step or AppSignal is not receiving any logs, you can always reach out for assistance. We'll help get you back on track!

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial