Permalink
Browse files

Fixup the broken supervisor so things can run as a real application

  • Loading branch information...
1 parent 0fbdb8c commit c9b1fbbc6207a0f786602f98ccea1b20a9c8315c @Vagabond committed Aug 12, 2011
Showing with 6 additions and 5 deletions.
  1. +1 −1 src/syslog.app.src
  2. +2 −2 src/syslog.erl
  3. +1 −1 src/syslog_app.erl
  4. +2 −1 src/syslog_sup.erl
View
@@ -7,6 +7,6 @@
kernel,
stdlib
]},
- {mod, { erlsyslog_app, []}},
+ {mod, { syslog_app, []}},
{env, []}
]}.
View
@@ -31,7 +31,7 @@
% API
-export([
start/0,
- start_linked/0,
+ start_link/0,
open/3,
log/2
]).
@@ -55,7 +55,7 @@
start() ->
gen_server:start({local, ?MODULE}, ?MODULE, [], []).
-start_linked() ->
+start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
open(Ident, Logopt, Facility) ->
View
@@ -10,7 +10,7 @@
%% ===================================================================
start(_StartType, _StartArgs) ->
- erlang_syslog_sup:start_link().
+ syslog_sup:start_link().
stop(_State) ->
ok.
View
@@ -24,5 +24,6 @@ start_link() ->
%% ===================================================================
init([]) ->
- {ok, { {one_for_one, 5, 10}, []} }.
+ {ok, { {one_for_all, 5, 10}, [{syslog, {syslog, start_link, []},
+ permanent, 5000, worker, [syslog]}] } }.

0 comments on commit c9b1fbb

Please sign in to comment.