onkel-dirtus / logger_file_backend

MIT License
307 stars 128 forks source link

File logging in production #52

Closed sheshankkodam closed 6 years ago

sheshankkodam commented 6 years ago

When working locally with the configuration below, file logging works. However, when created a release using MIX_ENV=test mix release --env=prod and running the application using _build/dev/rel/hutt/bin/hutt start command file logging does not work

Config.exs
-----------
 config :logger, :hutt,
        format: "$date $time $metadata[$level] $message\n",
        path: "log/hutt.log",
        level: :info`
sheshankkodam commented 6 years ago

The logs worked after updating `config/test.exs' with following changes

 config :logger, :console, format: "[$level] $message\n"