This repository provides an application that uses Elixir GenStages to print fake logs to stdout.
To run locally, I recommend installing Elixir and Erlang as described here .tool-versions file. ASDF is the simplest way to execute Elixir; you can read about ASDF with Elixir here:
So run the following command to install Elixir requirements.
# install rebar and hex
mix local.hex --force && mix local.rebar --force
# get all deps
mix deps.get --all
After that, we can run the project with mix.
mix run --no-halt
You may test a Docker image from my DockerHub repository:
# docker with delay
docker run -it --rm --env DELAY=5000 docker.io/willsenabr/fake-logger
# podman default delay
podman run -it --rm docker.io/willsenabr/fake-logger
Of course, there is test coverage, which you can run using the command:
mix test
Elixir enables us to produce releases from your project, which is awesome.
MIX_ENV=prod mix release
# starting release
_build/prod/rel/fake_logger/bin/fake_logger start
mix credo -a
- DELAY specifies how much demand should be consumed in milliseconds.