Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not set nil value for log_backtrace_at flag
dgraph-io#3062 added capabilities to set flag values from config file (we need this for glog). This caused an issue with the log_backtrace_at flag. The flag is defined as `flag.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace")` where tracelocation is ``` // traceLocation represents the setting of the -log_backtrace_at flag. type traceLocation struct { file string line int } ``` If the value isn't specified the nil value for tracelocation type is set in the config, which is tracelocation{"", 0}. But this value can't be set to the flag because of the check on line https://github.com/golang/glog/blob/master/glog.go#L374 This PR adds skips setting the flag to nil value if it nil in the config. Fixes dgraph-io#3076 Signed-off-by: Ibrahim Jarif <[email protected]>
- Loading branch information