diff options
| author | Luke Bakken <luke@bakken.io> | 2018-08-02 15:16:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-02 15:16:09 -0700 |
| commit | ca55dc9b25b895b8c6cbbdc6fd8402179fed5733 (patch) | |
| tree | 9eef05a8551a8fe6095b208bb6a3859b432debf1 /priv | |
| parent | b211e288263f09b9eba08638651a3ff96f1e89d4 (diff) | |
| parent | 033339aa2044b8b21534ece3e8b4a4d8cbd0ef7c (diff) | |
| download | rabbitmq-server-git-ca55dc9b25b895b8c6cbbdc6fd8402179fed5733.tar.gz | |
Merge pull request #1658 from rabbitmq/lrb-add-hostname-syslog-support
Add support for syslog server hostname
Diffstat (limited to 'priv')
| -rw-r--r-- | priv/schema/rabbit.schema | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema index 862537bf61..a7eaed2654 100644 --- a/priv/schema/rabbit.schema +++ b/priv/schema/rabbit.schema @@ -1067,6 +1067,7 @@ end}. {mapping, "log.syslog", "rabbit.log.syslog.enabled", [ {datatype, {enum, [true, false]}} ]}. + {mapping, "log.syslog.level", "rabbit.log.syslog.level", [ {datatype, {enum, [debug, info, notice, warning, error, critical, alert, emergency, none]}} ]}. @@ -1091,6 +1092,26 @@ end}. {validators, ["is_ip"]} ]}. +{mapping, "log.syslog.host", "syslog.dest_host", [ + {datatype, string} +]}. + +{translation, "syslog.dest_host", +fun(Conf) -> + case cuttlefish:conf_get("log.syslog", Conf) of + true -> + case cuttlefish:conf_get("log.syslog.ip", Conf, undefined) of + undefined -> + % If log.syslog.ip is not set, then this must be set + cuttlefish:conf_get("log.syslog.host", Conf); + IpAddr -> + IpAddr + end; + _ -> + cuttlefish:invalid("log.syslog must be set to true to set log.syslog.host or log.syslog.ip") + end +end}. + {mapping, "log.syslog.port", "syslog.dest_port", [ {datatype, integer} ]}. |
