Skip to content

Commit 6087eaa

Browse files
committed
[apricot] Notify about verbose setting
1 parent 621c317 commit 6087eaa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

apricot/apricot.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,18 @@ import (
4242
var log = logger.New(logrus.StandardLogger(), "apricot")
4343

4444
func Run() (err error) {
45+
verbose := false
4546
if viper.GetBool("verbose") {
4647
logrus.SetLevel(logrus.DebugLevel)
48+
verbose = true
4749
}
48-
log.WithField("level", infologger.IL_Support).Infof("AliECS Configuration Service (apricot v%s build %s) starting up", product.VERSION, product.BUILD)
50+
log.WithField("level", infologger.IL_Support).
51+
Infof("AliECS Configuration Service (apricot v%s build %s) starting up", product.VERSION, product.BUILD)
52+
if verbose {
53+
log.WithField("level", infologger.IL_Support).
54+
Infof("AliECS Configuration Service running with verbose logging")
55+
}
56+
4957

5058
s := remote.NewServer(Instance())
5159
httpsvr := local.NewHttpService(instance)

0 commit comments

Comments
 (0)