I have an Elixir app that I’ve been running for many years, and I deployed it to a new environment and it crashed with the following logs:
{"time":"2024-08-23 19:01:06.799","msg":"Running MyApp.Endpoint with cowboy 2.10.0 at :::8080 (http)","level":"info"}
{"time":"2024-08-23 19:01:06.800","msg":"Access MyApp.Endpoint at http://localhost","level":"info"}
{"time":"2024-08-23 19:01:06.890","msg":"Application my_app exited: shutdown","level":"notice"}
Kernel pid terminated (application_controller) ("{application_terminated,my_app,shutdown}")
The log messages show the the app shutdown, but doesn’t provide any information on why. It’d really like to see a stacktrace or an error report of some kind in the logs. In times past I’d use SASL to ensure I’d get crash reports, but with Erlang 26 I’m not sure what should be done. My config:
config :logger, :default_formatter,
format: {ExJsonLogger, :format},
metadata: [
:action,
:controller,
:duration,
:format,
:method,
:path,
:query_string,
:request_id,
:status
]
config :logger, :default_handler, level: :info
Versions:
erlang 26.2
elixir 1.15.7-otp-26