From 5419266724a1ce28c42a75d6db76414e31df56c7 Mon Sep 17 00:00:00 2001 From: turtled Date: Thu, 16 Feb 2017 18:33:57 +0800 Subject: [PATCH 1/2] emqttd_hook -> emqttd_hooks, syslog --- Makefile | 3 ++- src/emqttd_app.erl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3711319dd..1447dd30c 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,14 @@ PROJECT = emqttd PROJECT_DESCRIPTION = Erlang MQTT Broker PROJECT_VERSION = 2.1 -DEPS = gproc lager esockd mochiweb +DEPS = gproc lager esockd mochiweb lager_syslog dep_gproc = git https://github.com/uwiger/gproc dep_getopt = git https://github.com/jcomellas/getopt v0.8.2 dep_lager = git https://github.com/basho/lager master dep_esockd = git https://github.com/emqtt/esockd master dep_mochiweb = git https://github.com/emqtt/mochiweb +dep_lager_syslog = git https://github.com/basho/lager_syslog ERLC_OPTS += +'{parse_transform, lager_transform}' diff --git a/src/emqttd_app.erl b/src/emqttd_app.erl index 6f758b870..992e22da6 100644 --- a/src/emqttd_app.erl +++ b/src/emqttd_app.erl @@ -72,7 +72,7 @@ print_vsn() -> start_servers(Sup) -> Servers = [{"emqttd ctl", emqttd_ctl}, - {"emqttd hook", emqttd_hook}, + {"emqttd hook", emqttd_hooks}, {"emqttd router", emqttd_router}, {"emqttd pubsub", {supervisor, emqttd_pubsub_sup}}, {"emqttd stats", emqttd_stats}, From 726f829df5d68d4be2559085e66fb466ec28a9d0 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Thu, 16 Feb 2017 18:59:53 +0800 Subject: [PATCH 2/2] Fix the error caused by emqttd:env/1 --- src/emqttd_ws_client_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd_ws_client_sup.erl b/src/emqttd_ws_client_sup.erl index 60e1461b7..1375ac036 100644 --- a/src/emqttd_ws_client_sup.erl +++ b/src/emqttd_ws_client_sup.erl @@ -39,7 +39,7 @@ start_client(WsPid, Req, ReplyChannel) -> %%-------------------------------------------------------------------- init([]) -> - Env = lists:append(emqttd:env(client), emqttd:env(protocol)), + Env = lists:append(emqttd:env(client, []), emqttd:env(protocol, [])), {ok, {{simple_one_for_one, 0, 1}, [{ws_client, {emqttd_ws_client, start_link, [Env]}, temporary, 5000, worker, [emqttd_ws_client]}]}}.