Comment log.syslog.* to fix building issue

This commit is contained in:
Feng Lee 2018-07-19 10:08:37 +08:00
parent e2a34ec98d
commit cbbc231210
2 changed files with 14 additions and 13 deletions

View File

@ -391,7 +391,7 @@ log.crash.file = {{ platform_log_dir }}/crash.log
## Enable syslog. ## Enable syslog.
## ##
## Values: on | off ## Values: on | off
## log.syslog = on log.syslog = on
## Sets the severity level for syslog. ## Sets the severity level for syslog.
## ##

View File

@ -442,7 +442,7 @@ end}.
]}. ]}.
{mapping, "log.syslog", "lager.handlers", [ {mapping, "log.syslog", "lager.handlers", [
{default, off}, %%{default, off},
{datatype, flag} {datatype, flag}
]}. ]}.
@ -456,10 +456,10 @@ end}.
{datatype, {enum, [daemon, local0, local1, local2, local3, local4, local5, local6, local7]}} {datatype, {enum, [daemon, local0, local1, local2, local3, local4, local5, local6, local7]}}
]}. ]}.
{mapping, "log.syslog.level", "lager.handlers", [ %%{mapping, "log.syslog.level", "lager.handlers", [
{default, error}, %% {default, error},
{datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency]}} %% {datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency]}}
]}. %%]}.
{mapping, "log.error.redirect", "lager.error_logger_redirect", [ {mapping, "log.error.redirect", "lager.error_logger_redirect", [
{default, on}, {default, on},
@ -511,13 +511,14 @@ end}.
both -> [ConsoleHandler, ConsoleFileHandler]; both -> [ConsoleHandler, ConsoleFileHandler];
_ -> [] _ -> []
end, end,
SyslogHandler = case cuttlefish:conf_get("log.syslog", Conf) of SyslogHandler = [],
false -> []; %%case cuttlefish:conf_get("log.syslog", Conf, false) of
true -> [{lager_syslog_backend, %% false -> [];
[cuttlefish:conf_get("log.syslog.identity", Conf), %% true -> [{lager_syslog_backend,
cuttlefish:conf_get("log.syslog.facility", Conf), %% [cuttlefish:conf_get("log.syslog.identity", Conf),
cuttlefish:conf_get("log.syslog.level", Conf)]}] %% cuttlefish:conf_get("log.syslog.facility", Conf),
end, %% cuttlefish:conf_get("log.syslog.level", Conf)]}]
%%end,
ConsoleHandlers ++ ErrorHandler ++ InfoHandler ++ SyslogHandler ConsoleHandlers ++ ErrorHandler ++ InfoHandler ++ SyslogHandler
end end
}. }.