mirror of https://github.com/hashicorp/consul
agent: Set custom syslog facility. Fixes #170.
parent
82c27cb902
commit
8bdfd8c7b2
|
@ -167,7 +167,7 @@ func (c *Command) setupLoggers(config *Config) (*GatedWriter, *logWriter, io.Wri
|
||||||
// Check if syslog is enabled
|
// Check if syslog is enabled
|
||||||
var syslog io.Writer
|
var syslog io.Writer
|
||||||
if config.EnableSyslog {
|
if config.EnableSyslog {
|
||||||
l, err := gsyslog.NewLogger(gsyslog.LOG_NOTICE, "consul")
|
l, err := gsyslog.NewLogger(gsyslog.LOG_NOTICE, config.SyslogFacility, "consul")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Syslog setup failed: %v", err))
|
c.Ui.Error(fmt.Sprintf("Syslog setup failed: %v", err))
|
||||||
return nil, nil, nil
|
return nil, nil, nil
|
||||||
|
|
Loading…
Reference in New Issue