Packages
API for the Bunyan distributed and pluggable logging system (error, warn, info, and debug functions)
Current section
3 Versions
Jump to
Current section
3 Versions
Compare versions
5
files changed
+16
additions
-12
deletions
| @@ -20,4 +20,4 @@ | |
| 20 20 | {<<"optional">>,false}, |
| 21 21 | {<<"repository">>,<<"hexpm">>}, |
| 22 22 | {<<"requirement">>,<<">= 0.0.0">>}]]}. |
| 23 | - {<<"version">>,<<"0.1.0">>}. |
| 23 | + {<<"version">>,<<"0.5.2">>}. |
| @@ -28,8 +28,6 @@ defmodule Bunyan.Source.Api do | |
| 28 28 | |
| 29 29 | @spec log(Level.type_as_number, msg_or_fun :: binary | (() -> binary()) , extra :: any()) :: any() |
| 30 30 | defp log(level, msg_or_fun, extra) do |
| 31 | - IO.inspect @server_name |
| 32 | - IO.inspect Process.whereis(@server_name) |
| 33 31 | GenServer.cast(@server_name, { level, msg_or_fun, extra }) |
| 34 32 | end |
| 35 33 | end |
| @@ -15,7 +15,6 @@ defmodule Bunyan.Source.Api.Server do | |
| 15 15 | end |
| 16 16 | |
| 17 17 | def handle_cast({ level, msg_or_fun, extra }, options) do |
| 18 | - IO.inspect { level, msg_or_fun, extra , options } |
| 19 18 | if level >= options.runtime_log_level do |
| 20 19 | msg = %LogMsg{ |
| 21 20 | level: level, |
| @@ -1,4 +1,6 @@ | |
| 1 | - Code.load_file("shared_build_stuff/mix.exs") |
| 1 | + unless function_exported?(Bunyan.Shared.Build, :__info__, 1), |
| 2 | + do: Code.require_file("shared_build_stuff/mix.exs") |
| 3 | + |
| 2 4 | alias Bunyan.Shared.Build |
| 3 5 | |
| 4 6 | defmodule BunyanSourceApi.MixProject do |
| @@ -7,7 +9,6 @@ defmodule BunyanSourceApi.MixProject do | |
| 7 9 | def project() do |
| 8 10 | Build.project( |
| 9 11 | :bunyan_source_api, |
| 10 | - "0.1.0", |
| 11 12 | &deps/1, |
| 12 13 | "API for the Bunyan distributed and pluggable logging system (error, warn, info, and debug functions)" |
| 13 14 | ) |
| @@ -15,8 +16,7 @@ defmodule BunyanSourceApi.MixProject do | |
| 15 16 | |
| 16 17 | def application(), do: [] |
| 17 18 | |
| 18 | - def deps(a) do |
| 19 | - IO.inspect a |
| 19 | + def deps(_) do |
| 20 20 | [ |
| 21 21 | bunyan: [ bunyan_shared: ">= 0.0.0" ], |
| 22 22 | others: [], |
| @@ -1,4 +1,12 @@ | |
| 1 1 | defmodule Bunyan.Shared.Build do |
| 2 | + |
| 3 | + @version "0.5.2" |
| 4 | + |
| 5 | + @moduledoc """ |
| 6 | + This file is manually included in each Bunyan mix.exs. It provides a |
| 7 | + couple of common helpers for the build process. |
| 8 | + """ |
| 9 | + |
| 2 10 | def is_developer? do |
| 3 11 | cond do |
| 4 12 | Mix.env == :prod -> false |
| @@ -10,10 +18,10 @@ defmodule Bunyan.Shared.Build do | |
| 10 18 | end |
| 11 19 | end |
| 12 20 | |
| 13 | - def project(name, version, deps, description) do |
| 21 | + def project(name, deps, description) do |
| 14 22 | [ |
| 15 23 | app: name, |
| 16 | - version: version, |
| 24 | + version: @version, |
| 17 25 | elixir: "~> 1.6", |
| 18 26 | deps: build_deps(deps.(Mix.env)), |
| 19 27 | description: description, |
| @@ -23,7 +31,6 @@ defmodule Bunyan.Shared.Build do | |
| 23 31 | end |
| 24 32 | |
| 25 33 | defp package(name) do |
| 26 | - IO.puts "Mix env = #{Mix.env}" |
| 27 34 | [ |
| 28 35 | name: name, |
| 29 36 | files: ["lib", "mix.exs", "README.md", "shared_build_stuff/*"], |
| @@ -52,7 +59,7 @@ defmodule Bunyan.Shared.Build do | |
| 52 59 | end |
| 53 60 | |
| 54 61 | defp one_bunyan_dep(name, _version, true) do |
| 55 | - { name, path: "../#{name}" } |
| 62 | + { name, path: "../#{name}", override: true, env: Mix.env } |
| 56 63 | end |
| 57 64 | |
| 58 65 | defp one_bunyan_dep(name, version, false) do |