github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/benchmark/internal/config/interface.go (about)

     1  package config
     2  
     3  import (
     4  	"github.com/sirupsen/logrus"
     5  )
     6  
     7  type FileConfiger interface{ ConfigFilePath() string }
     8  
     9  type LoggerFunc func(s string)
    10  type LoggerConfiger interface{ InitializeLogging() LoggerFunc }
    11  
    12  func (cfg LoadGen) InitializeLogging() LoggerFunc {
    13  	if l, err := logrus.ParseLevel(cfg.LogLevel); err == nil {
    14  		logrus.SetLevel(l)
    15  	}
    16  
    17  	return nil
    18  }