|
|
|
@@ -572,6 +572,11 @@ func CloudbrainGetLog(ctx *context.APIContext) { |
|
|
|
startLine = 0 |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
if startLine > 0 { |
|
|
|
startLine += 1 |
|
|
|
endLine += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
result = getLogFromModelDir(job.JobName, startLine, endLine, resultPath) |
|
|
|
if result == nil { |
|
|
|
@@ -723,6 +728,7 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s |
|
|
|
re = re + line |
|
|
|
count++ |
|
|
|
} |
|
|
|
fileEndLine = i + 1 |
|
|
|
log.Info("read file completed.") |
|
|
|
break |
|
|
|
} |
|
|
|
@@ -732,13 +738,12 @@ func getLogFromModelDir(jobName string, startLine int, endLine int, resultPath s |
|
|
|
} |
|
|
|
if error == nil { |
|
|
|
if i >= startLine { |
|
|
|
fileEndLine = i |
|
|
|
fileEndLine = i + 1 |
|
|
|
re = re + line |
|
|
|
count++ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
fileEndLine = fileEndLine + 1 |
|
|
|
} else { |
|
|
|
log.Info("error:" + err.Error()) |
|
|
|
} |
|
|
|
|