Skip to content

Commit

Permalink
Enable the stdout/stderr logfile to be renamed and disabled. Configur…
Browse files Browse the repository at this point in the history
…ation matches original burrow.out behavior. Resolves linkedin#57
  • Loading branch information
CVTJNII committed Nov 7, 2016
1 parent 3726a11 commit cb4868f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type BurrowConfig struct {
ClientID string `gcfg:"client-id"`
GroupBlacklist string `gcfg:"group-blacklist"`
GroupWhitelist string `gcfg:"group-whitelist"`
StdoutLogfile string `gcfg:"stdout-logfile"`
}
Zookeeper struct {
Hosts []string `gcfg:"hostname"`
Expand Down
1 change: 1 addition & 0 deletions docker-config/burrow.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[general]
logconfig=/etc/burrow/logging.cfg
group-blacklist=^(console-consumer-|python-kafka-consumer-).*$
stdout-logfile=burrow.out

[zookeeper]
hostname=zookeeper
Expand Down
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ func burrowMain() int {
createPidFile(appContext.Config.General.LogDir + "/" + appContext.Config.General.PIDFile)
defer removePidFile(appContext.Config.General.LogDir + "/" + appContext.Config.General.PIDFile)

// Set up stderr/stdout to go to a separate log file
openOutLog(appContext.Config.General.LogDir + "/burrow.out")
// Set up stderr/stdout to go to a separate log file, if enabled
if appContext.Config.General.StdoutLogfile != "" {
openOutLog(appContext.Config.General.LogDir + "/" + appContext.Config.General.StdoutLogfile)
}
fmt.Println("Started Burrow at", time.Now().Format("January 2, 2006 at 3:04pm (MST)"))

// If a logging config is specified, replace the existing loggers
Expand Down

0 comments on commit cb4868f

Please sign in to comment.