1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-21 19:48:53 +02:00

Only print logs if error occurred (#4823)

This commit is contained in:
Daniel Mieg 2024-02-09 10:20:27 +01:00 committed by GitHub
parent 4e3fa38dd3
commit f51fbc3e4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,7 @@ func printLogProtocolEntries(logEntry LogResultsV2, logProtocols []LogProtocol)
sort.SliceStable(logProtocols, func(i, j int) bool {
return logProtocols[i].ProtocolLine < logProtocols[j].ProtocolLine
})
if logEntry.Status != `Success` {
if logEntry.Status == `Error` {
for _, entry := range logProtocols {
log.Entry().Info(entry.Description)
}