Skip to content

Commit

Permalink
Merge pull request #45 from kube-logging/config-host
Browse files Browse the repository at this point in the history
conf: make host and appname configurable
  • Loading branch information
MrAnno authored Sep 26, 2023
2 parents ba82c3f + 885cab5 commit 2028f6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions conf/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func Init() {
viper.SetDefault("message.byte-per-sec", 200)
viper.SetDefault("message.max-random-hosts", 1000)
viper.SetDefault("message.max-random-apps", 100)
viper.SetDefault("message.host", "hostname")
viper.SetDefault("message.appname", "appname")

viper.SetDefault("api.addr", ":11000")
viper.SetDefault("api.basePath", "/")
Expand Down
4 changes: 2 additions & 2 deletions formats/syslog/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func SampleData() TemplateData {
Facility: 20,
severity: 5,
dateTime: time.Date(2011, 6, 25, 20, 0, 4, 0, time.UTC),
Host: "hostname",
AppName: "appname",
Host: viper.GetString("message.host"),
AppName: viper.GetString("message.appname"),
PID: 1143,
Seq: 1,
Msg: "An application event log entry...",
Expand Down

0 comments on commit 2028f6a

Please sign in to comment.