create windows branch

This commit is contained in:
turtled 2017-02-20 19:21:28 +08:00
parent e88c3f0761
commit 9468f71c2f
3 changed files with 2 additions and 37 deletions

View File

@ -2,14 +2,13 @@ PROJECT = emqttd
PROJECT_DESCRIPTION = Erlang MQTT Broker
PROJECT_VERSION = 2.1
DEPS = gproc lager esockd mochiweb lager_syslog
DEPS = gproc lager esockd mochiweb
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}'

View File

@ -63,12 +63,6 @@ log.dir = {{ platform_log_dir }}
## Console log. Enum: off, file, console, both
log.console = console
## Syslog. Enum: on, off
log.syslog = on
## syslog level. Enum: debug, info, notice, warning, error, critical, alert, emergency
log.syslog.level = error
## Console log level. Enum: debug, info, notice, warning, error, critical, alert, emergency
log.console.level = error

View File

@ -173,26 +173,6 @@ end}.
{datatype, file}
]}.
{mapping, "log.syslog", "lager.handlers", [
{default, off},
{datatype, flag}
]}.
{mapping, "log.syslog.identity", "lager.handlers", [
{default, "emq"},
{datatype, string}
]}.
{mapping, "log.syslog.facility", "lager.handlers", [
{default, local0},
{datatype, {enum, [daemon, local0, local1, local2, local3, local4, local5, local6, local7]}}
]}.
{mapping, "log.syslog.level", "lager.handlers", [
{default, err},
{datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency]}}
]}.
{mapping, "log.error.redirect", "lager.error_logger_redirect", [
{default, on},
{datatype, flag},
@ -235,15 +215,7 @@ end}.
_ -> []
end,
SyslogHandler = case cuttlefish:conf_get("log.syslog", Conf) of
false -> [];
true -> [{lager_syslog_backend,
[cuttlefish:conf_get("log.syslog.identity", Conf),
cuttlefish:conf_get("log.syslog.facility", Conf),
cuttlefish:conf_get("log.syslog.level", Conf)]}]
end,
ConsoleHandlers ++ ErrorHandler ++ SyslogHandler
ConsoleHandlers ++ ErrorHandler
end
}.