Support a reporting via Syslog (#604)

* Support a reporting via syslog

* Update dependencies
This commit is contained in:
Teppei Fukuda
2018-02-27 20:38:34 +09:00
committed by Kota Kanbe
parent 0653656526
commit b08969ad89
9 changed files with 410 additions and 22 deletions

View File

@@ -58,6 +58,7 @@ type ReportCmd struct {
toSlack bool
toEMail bool
toSyslog bool
toLocalFile bool
toS3 bool
toAzureBlob bool
@@ -264,6 +265,7 @@ func (p *ReportCmd) SetFlags(f *flag.FlagSet) {
f.BoolVar(&p.toSlack, "to-slack", false, "Send report via Slack")
f.BoolVar(&p.toEMail, "to-email", false, "Send report via Email")
f.BoolVar(&p.toSyslog, "to-syslog", false, "Send report via Syslog")
f.BoolVar(&p.toLocalFile,
"to-localfile",
false,
@@ -363,6 +365,10 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
reports = append(reports, report.EMailWriter{})
}
if p.toSyslog {
reports = append(reports, report.SyslogWriter{})
}
if p.toLocalFile {
reports = append(reports, report.LocalFileWriter{
CurrentDir: dir,