change: print hrp exit code

This commit is contained in:
lilong.129
2023-06-13 18:38:46 +08:00
parent a70362d81a
commit 475def50f8
2 changed files with 2 additions and 6 deletions
-2
View File
@@ -5,7 +5,6 @@ import (
"time" "time"
"github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go"
"github.com/rs/zerolog/log"
"github.com/httprunner/httprunner/v4/hrp/cmd" "github.com/httprunner/httprunner/v4/hrp/cmd"
) )
@@ -23,6 +22,5 @@ func main() {
}() }()
exitCode := cmd.Execute() exitCode := cmd.Execute()
log.Info().Int("code", exitCode).Msg("hrp exit")
os.Exit(exitCode) os.Exit(exitCode)
} }
+2 -4
View File
@@ -156,10 +156,6 @@ func IsErrorPredefined(err error) bool {
} }
func GetErrorCode(err error) (errCode int) { func GetErrorCode(err error) (errCode int) {
defer func() {
log.Debug().Int("code", errCode).Msg("get error code")
}()
if err == nil { if err == nil {
return Success return Success
} }
@@ -170,5 +166,7 @@ func GetErrorCode(err error) (errCode int) {
} else { } else {
errCode = GeneralFail errCode = GeneralFail
} }
log.Warn().Int("code", errCode).Msg("hrp exit")
return return
} }