StacktraceGpt.LoggerBackend (stacktrace_gpt v0.1.1)

Logger backend for StacktraceGpt

The purpose of this backend is to catch only errors, store error messages in the ETS table to form a LIFO queue and pass them to the next Logger backend.

This backend should be only used in development environment, so it's not included in the list of backends in config.exs but rather in dev.exs:

# config/dev.exs

config :logger,
  backends: [:console, StacktraceGpt.LoggerBackend]

Link to this section Summary

Functions

This is where we add stacktrace to the ETS table and pass error to the next Logger backend

Link to this section Functions

Link to this function

handle_event(arg, state)

This is where we add stacktrace to the ETS table and pass error to the next Logger backend