Managing Log files with distillery


Using distillery to start an OTP App, I noticed that all the logs go to the ./var/log/ folder to 2 different files:

  • erlang.log.1
  • run_erl.log


I have issues here:

  1. I don’t know what run_erl.log is supposed to log
  2. I would like to change the default log path from ./var/log/erlang.log.1 to ./log/myapp.log


I have checked this discussion for some hints, but according to it I have to change the configurations on the :logger extra app.

Log files in Distillery releases

This search led me to the following code snippet which uses :logger_file_backend

However I think I am chasing a wild goose here. I don’t think that the solution to my problem lies in adding more dependencies, but rather in changing some configuration for the :logger app.

I just don’t know where nor how.

How can I do it?

1 Like