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

View File

@@ -5,7 +5,6 @@ import (
"time"
"github.com/getsentry/sentry-go"
"github.com/rs/zerolog/log"
"github.com/httprunner/httprunner/v4/hrp/cmd"
)
@@ -23,6 +22,5 @@ func main() {
}()
exitCode := cmd.Execute()
log.Info().Int("code", exitCode).Msg("hrp exit")
os.Exit(exitCode)
}

View File

@@ -156,10 +156,6 @@ func IsErrorPredefined(err error) bool {
}
func GetErrorCode(err error) (errCode int) {
defer func() {
log.Debug().Int("code", errCode).Msg("get error code")
}()
if err == nil {
return Success
}
@@ -170,5 +166,7 @@ func GetErrorCode(err error) (errCode int) {
} else {
errCode = GeneralFail
}
log.Warn().Int("code", errCode).Msg("hrp exit")
return
}