Logs and Errors

Learn how to use Logger in Elixir to provide defense against bugs.

Logger

The first defense against bugs is application-specific information, and the best way to acquire that is via old-fashioned logging. Elixir comes with the creatively named built-in Logger for logging messages. The word “messages” matters, because Logger was designed with a focus on text-based reports and not structured data. Logger contains four severity levels. From least to most severe, they are as follows:

Get hands-on with 1200+ tech skills courses.