Skip to content

Commit

Permalink
Merge pull request #18 from SmartColumbusOS/make_divo_quieter
Browse files Browse the repository at this point in the history
Divo is too chatty
  • Loading branch information
jeffgrunewald authored Mar 29, 2019
2 parents ff84531 + 2921ff7 commit a81c096
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/divo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ defmodule Divo do
dependent_apps =
Application.spec(app, :applications) -- [:kernel, :stdlib, :elixir, :ex_unit, :logger, :divo, :placebo]

Logger.remove_backend(:console)

[app | dependent_apps]
|> Enum.each(&Application.stop/1)

Logger.add_backend(:console)
end

Divo.Compose.kill()
Expand Down
4 changes: 3 additions & 1 deletion lib/divo/compose.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ defmodule Divo.Compose do
end

defp await() do
Logger.info("Please wait for containers to register as 'healthy'")

fetch_containers()
|> Enum.filter(&health_defined?/1)
|> Enum.map(&await_healthy/1)
Expand All @@ -95,7 +97,7 @@ defmodule Divo.Compose do

defp check_health(container) do
fn ->
Logger.info("Checking #{container} is healthy...")
Logger.debug("Checking #{container} is healthy...")

container
|> health_status()
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Divo.MixProject do
def project do
[
app: :divo,
version: "1.1.0",
version: "1.1.1",
elixir: "~> 1.8",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit a81c096

Please sign in to comment.