some config & project additions/changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
diff --git a/config/config.exs b/config/config.exs
index 5b92181..e7b3dfb 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -1,30 +1,27 @@
-# This file is responsible for configuring your application
-# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
-# This configuration is loaded before any dependency and is restricted
-# to this project. If another project depends on this project, this
-# file won't be loaded nor affect the parent project. For this reason,
-# if you want to provide default values for your application for
-# 3rd-party users, it should be done in your "mix.exs" file.
+config :logger,
+ backends: [:console],
+ level: :debug,
+ format: "\n$date $time [$level] $metadata$message"
-# You can configure for your application as:
-#
-# config :ex_ovh, key: :value
-#
-# And access this configuration in your application as:
-#
-# Application.get_env(:ex_ovh, :key)
-#
-# Or configure a 3rd-party app:
-#
-# config :logger, level: :info
-#
-# It is also possible to import configuration files, relative to this
-# directory. For example, you can emulate configuration per environment
-# by uncommenting the line below and defining dev.exs, test.exs and such.
-# Configuration from the imported file will override the ones defined
-# here (which is why it is important to import them last).
-#
-import_config "#{Mix.env}.exs"
+if Mix.env == :dev do
+ config :logger,
+ backends: [:console],
+ compile_time_purge_level: :debug
+end
+
+if Mix.env == :prod do
+ config :logger,
+ backends: [:console],
+ compile_time_purge_level: :warn
+end
+
+if Mix.env == :test do
+ config :logger,
+ backends: [:console],
+ compile_time_purge_level: :warn
+end
+
+import_config "#{Mix.env}.exs"
\ No newline at end of file
diff --git a/mix.exs b/mix.exs
index 88bfead..05196c4 100644
--- a/mix.exs
+++ b/mix.exs
@@ -27,12 +27,12 @@ defmodule ExOvh.Mixfile do
[
{:httpotion, "~> 2.2"},
{:poison, "~> 2.0"},
- {:secure_random, "~> 0.2"},
+ {:secure_random , "~> 0.2"},
{:floki, "~> 0.7.1"},
{:calendar, "~> 0.12.4"},
+ {:og, "~> 0.0", only: :dev},
{:earmark, "~> 0.2.1", only: :dev},
- {:ex_doc, "~> 0.11", only: :dev},
- {:og, "~> 0.0"}
+ {:ex_doc, "~> 0.11", only: :dev}
]
end
@@ -48,7 +48,7 @@ defmodule ExOvh.Mixfile do
licenses: ["MIT"],
maintainers: ["Stephen Moloney"],
links: %{ "GitHub" => "https://github.com/stephenmoloney/ex_ovh"},
- files: ~w(lib priv mix.exs README* LICENSE* CHANGELOG* changelog* src)
+ files: ~w(lib priv mix.exs README* LICENSE* CHANGELOG*)
}
end