An Elixir app template demonstrating setting up structured logging.
-
Install Elixir with Erlang/OTP - See
.tool-versions
. -
Once installed, run
mix local.hex --force && mix local.rebar --force
to get Hex and Rebar installed. -
Set the needed environment variables. See Environment Variables below for more information.
-
Install dependencies with
mix deps.get
. -
Start the Phoenix endpoint with
mix phx.server
or in interactive mode withiex -S mix phx.server
(preferred).
Environment variables may be set by adding the value to a .env-dev
file in the root of the project. Make a copy of .env-sample
and rename it appropriately. This file is not versioned in the repository. Alternately, they may of course be set at the command line.
The CONSOLE_LOGGING
environment variable will be used to switch to unstructured logging.