1
0
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:
tiloKo 2023-04-06 08:31:22 +02:00 committed by GitHub
parent a2c0f89222
commit 126fbbcc69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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