Commit f5891b7eb1ce441a950f972d654a0f9f9bac87eb

Stephen Moloney 2016-02-18T22:44:30

some config & project additions/changes

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