I’m deploying my Phoenix app using mix_systemd package, to run it as systemd unit file. The app’s runtime is in /srv/appname/current,
Problem: The app tries to create log files under /srv/appname/current/log/error.log and /srv/appname/current/console.log. I would like to configure it to create the log files under /var/log/appname.
I have no idea where this file creation comes from. My configuration does not contain logging to files:
Application.get_env :logger, :backends [:console, Sentry.LoggerBackend]
Despite this, I’m getting these errors and the process crashes:
Jul 22 17:18:50 steinem proca: 17:18:50.230 [error] Failed to open log file log/error.log with error permission denied Jul 22 17:18:50 steinem proca: 17:18:50.231 [error] Failed to open log file log/console.log with error permission denied
I do not know which elixir module emits these errors (no traceback). Is this some “standard” behaviour for releases? How can I control it?