[agent-go] fix-bugs
This commit is contained in:
@@ -63,6 +63,7 @@ func PipeLineCommandExecutor(pipeLineCommand [][]string) ([]string, error) {
|
|||||||
prevCmd := cmds[i-1]
|
prevCmd := cmds[i-1]
|
||||||
out, err := prevCmd.StdoutPipe()
|
out, err := prevCmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.ErrorF("Pipeline command error happened! Command is => %v, Error is %v", partOfCommand, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cmd.Stdin = out
|
cmd.Stdin = out
|
||||||
|
|||||||
@@ -67,8 +67,9 @@ func (l *Logger) Warn(msg string, fields ...zap.Field) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Error logs an error message.
|
// Error logs an error message.
|
||||||
func (l *Logger) Error(msg string, fields ...zap.Field) {
|
|
||||||
l.Logger.Error(msg, fields...)
|
func (l *Logger) ErrorF(msg string, args ...interface{}) {
|
||||||
|
l.Logger.Error(fmt.Sprintf(msg, args...))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatal logs a fatal message and exits the program with a non-zero status code.
|
// Fatal logs a fatal message and exits the program with a non-zero status code.
|
||||||
|
|||||||
Reference in New Issue
Block a user