Search code examples
elixirexrm

How do you configure the log files written to rel/myproject/log?


I've built my Elixir project and made a release with EXRM. When I copied it to a target server and started it up, I was happy to find that it was already capturing console output in files like "erlang.log.1" in a log directory. It appears to let the files grow to 10k and then rotates among five files. Is there any way to configure how large those files are allowed to get and how many to keep?


Solution

  • The release is started with a tool called run_erl. You should be able to control how many files you want to keep with RUN_ERL_LOG_GENERATIONS and the size with RUN_ERL_LOG_MAXSIZE environment variables.