Errorgap.LoggerHandler (errorgap v0.2.0)

Copy Markdown View Source

An OTP :logger handler that reports crash reports to Errorgap.

Attach it once at startup — for example in your application's start/2 — so unhandled exceptions in supervised processes (GenServers, Tasks, Phoenix channels) are captured automatically:

Errorgap.LoggerHandler.attach()

Only log events carrying a :crash_reason are reported; ordinary log lines are ignored. Deliver those explicitly with Errorgap.log/3.

Summary

Functions

Attach the handler to the default logger. Idempotent.

Detach the handler.

Functions

attach(opts \\ [])

Attach the handler to the default logger. Idempotent.

detach()

Detach the handler.