mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-11-28 08:49:44 +02:00
reduce Log Output (Info -> Debug) (#4322)
Co-authored-by: ffeldmann <f.feldmann@sap.com>
This commit is contained in:
parent
a2c0f89222
commit
126fbbcc69
10
cmd/piper.go
10
cmd/piper.go
@ -272,7 +272,7 @@ func initStageName(outputToLog bool) {
|
||||
var stageNameSource string
|
||||
if outputToLog {
|
||||
defer func() {
|
||||
log.Entry().Infof("Using stageName '%s' from %s", GeneralConfig.StageName, stageNameSource)
|
||||
log.Entry().Debugf("Using stageName '%s' from %s", GeneralConfig.StageName, stageNameSource)
|
||||
}()
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ func PrepareConfig(cmd *cobra.Command, metadata *config.StepData, stepName strin
|
||||
{
|
||||
projectConfigFile := getProjectConfigFile(GeneralConfig.CustomConfig)
|
||||
if exists, err := piperutils.FileExists(projectConfigFile); exists {
|
||||
log.Entry().Infof("Project config: '%s'", projectConfigFile)
|
||||
log.Entry().Debugf("Project config: '%s'", projectConfigFile)
|
||||
if customConfig, err = openFile(projectConfigFile, GeneralConfig.GitHubAccessTokens); err != nil {
|
||||
return errors.Wrapf(err, "Cannot read '%s'", projectConfigFile)
|
||||
}
|
||||
@ -381,11 +381,11 @@ func PrepareConfig(cmd *cobra.Command, metadata *config.StepData, stepName strin
|
||||
// only create error for non-default values
|
||||
if err != nil {
|
||||
if projectDefaultFile != ".pipeline/defaults.yaml" {
|
||||
log.Entry().Infof("Project defaults: '%s'", projectDefaultFile)
|
||||
log.Entry().Debugf("Project defaults: '%s'", projectDefaultFile)
|
||||
return errors.Wrapf(err, "Cannot read '%s'", projectDefaultFile)
|
||||
}
|
||||
} else {
|
||||
log.Entry().Infof("Project defaults: '%s'", projectDefaultFile)
|
||||
log.Entry().Debugf("Project defaults: '%s'", projectDefaultFile)
|
||||
defaultConfig = append(defaultConfig, fc)
|
||||
}
|
||||
}
|
||||
@ -430,7 +430,7 @@ func PrepareConfig(cmd *cobra.Command, metadata *config.StepData, stepName strin
|
||||
|
||||
func retrieveHookConfig(source map[string]interface{}, target *HookConfiguration) {
|
||||
if source != nil {
|
||||
log.Entry().Info("Retrieving hook configuration")
|
||||
log.Entry().Debug("Retrieving hook configuration")
|
||||
b, err := json.Marshal(source)
|
||||
if err != nil {
|
||||
log.Entry().Warningf("Failed to marshal source hook configuration: %v", err)
|
||||
|
@ -145,7 +145,7 @@ func (c *Config) InitializeConfig(configuration io.ReadCloser, defaults []io.Rea
|
||||
|
||||
// consider custom defaults defined in config.yml unless told otherwise
|
||||
if ignoreCustomDefaults {
|
||||
log.Entry().Info("Ignoring custom defaults from pipeline config")
|
||||
log.Entry().Debug("Ignoring custom defaults from pipeline config")
|
||||
} else if c.CustomDefaults != nil && len(c.CustomDefaults) > 0 {
|
||||
if c.openFile == nil {
|
||||
c.openFile = OpenPiperFile
|
||||
|
Loading…
Reference in New Issue
Block a user