diff --git a/routers/api/v1/repo/cloudbrain.go b/routers/api/v1/repo/cloudbrain.go index ba46ab58c..f165836bd 100755 --- a/routers/api/v1/repo/cloudbrain.go +++ b/routers/api/v1/repo/cloudbrain.go @@ -573,6 +573,12 @@ func CloudbrainGetLog(ctx *context.APIContext) { } } } + else { + if startLine > 0 { + startLine += 1 + endLine += 1 + } + } result = getLogFromModelDir(job.JobName, startLine, endLine, resultPath) if result == nil { log.Error("GetJobLog failed: %v", err, ctx.Data["MsgID"])