Skip to content

Commit

Permalink
do not concat version if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Jan 6, 2022
1 parent 897df4c commit 4215d1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libbeat/common/cfgwarn/cfgwarn.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ func Beta(format string, v ...interface{}) {
// Deprecate logs a deprecation message.
// The version string contains the version when the future will be removed
func Deprecate(version string, format string, v ...interface{}) {
postfix := fmt.Sprintf(" Will be removed in version: %s", version)
var postfix string
if version != "" {
postfix = fmt.Sprintf(" Will be removed in version: %s", version)
}
logp.NewLogger(selector, zap.AddCallerSkip(1)).Warnf("DEPRECATED: "+format+postfix, v...)
}

Expand Down

0 comments on commit 4215d1e

Please sign in to comment.