Merge pull request #903 from emqtt/develop

Add lager syslog
This commit is contained in:
Feng Lee 2017-02-16 18:59:39 +08:00 committed by GitHub
commit 269cef2c1b
3 changed files with 4 additions and 3 deletions

View File

@ -2,13 +2,14 @@ PROJECT = emqttd
PROJECT_DESCRIPTION = Erlang MQTT Broker PROJECT_DESCRIPTION = Erlang MQTT Broker
PROJECT_VERSION = 2.1 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_gproc = git https://github.com/uwiger/gproc
dep_getopt = git https://github.com/jcomellas/getopt v0.8.2 dep_getopt = git https://github.com/jcomellas/getopt v0.8.2
dep_lager = git https://github.com/basho/lager master dep_lager = git https://github.com/basho/lager master
dep_esockd = git https://github.com/emqtt/esockd master dep_esockd = git https://github.com/emqtt/esockd master
dep_mochiweb = git https://github.com/emqtt/mochiweb dep_mochiweb = git https://github.com/emqtt/mochiweb
dep_lager_syslog = git https://github.com/basho/lager_syslog
ERLC_OPTS += +'{parse_transform, lager_transform}' ERLC_OPTS += +'{parse_transform, lager_transform}'

View File

@ -72,7 +72,7 @@ print_vsn() ->
start_servers(Sup) -> start_servers(Sup) ->
Servers = [{"emqttd ctl", emqttd_ctl}, Servers = [{"emqttd ctl", emqttd_ctl},
{"emqttd hook", emqttd_hook}, {"emqttd hook", emqttd_hooks},
{"emqttd router", emqttd_router}, {"emqttd router", emqttd_router},
{"emqttd pubsub", {supervisor, emqttd_pubsub_sup}}, {"emqttd pubsub", {supervisor, emqttd_pubsub_sup}},
{"emqttd stats", emqttd_stats}, {"emqttd stats", emqttd_stats},

View File

@ -39,7 +39,7 @@ start_client(WsPid, Req, ReplyChannel) ->
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
init([]) -> 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}, {ok, {{simple_one_for_one, 0, 1},
[{ws_client, {emqttd_ws_client, start_link, [Env]}, [{ws_client, {emqttd_ws_client, start_link, [Env]},
temporary, 5000, worker, [emqttd_ws_client]}]}}. temporary, 5000, worker, [emqttd_ws_client]}]}}.