From 9fecd50152fc0d4535e0346e32b23181782a1535 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Thu, 5 May 2016 22:57:28 -0700 Subject: [PATCH] Do not start syslog ourselves It will be started automatically because it is in our applications. We also should not include logger in our applications because we don't want to start it before we start. --- README.md | 5 +++-- lib/ex_syslog.ex | 1 - mix.exs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2da16e3..a83e72d 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,12 @@ defp deps do end ``` -Add `:exsyslog` to your list of `included_applications`: +Add `:exsyslog` to your list of `applications`, be sure to put it at the +beginning, before `:logger` or anything that requires it: ```elixir def application do - [included_applications: [:exsyslog]] + [applications: [:exsyslog]] end ``` diff --git a/lib/ex_syslog.ex b/lib/ex_syslog.ex index a59e223..9f6bb20 100644 --- a/lib/ex_syslog.ex +++ b/lib/ex_syslog.ex @@ -11,7 +11,6 @@ defmodule ExSyslog do def init({__MODULE__, name}) do config = get_config(name, []) - :syslog.start() {:ok, log} = open_log(config) {:ok, %{name: name, log: log, config: config}} diff --git a/mix.exs b/mix.exs index 6fd29cb..11b753c 100644 --- a/mix.exs +++ b/mix.exs @@ -16,7 +16,7 @@ defmodule Exsyslog.Mixfile do # # Type `mix help compile.app` for more information def application do - [applications: [:logger, :syslog, :poison]] + [applications: [:syslog, :poison]] end defp description do