mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
fix 无法获取日志的问题
This commit is contained in:
@@ -41,7 +41,7 @@ func GetLocalLog(logPath string) (fileBytes []byte, err error) {
|
||||
}
|
||||
n, err := f.ReadAt(logBuf, off)
|
||||
// 到文件结尾会有EOF的报错
|
||||
if err.Error() != "EOF" && err != nil {
|
||||
if err != nil && err.Error() != "EOF" {
|
||||
log.Error(err.Error())
|
||||
debug.PrintStack()
|
||||
return nil, err
|
||||
|
||||
@@ -308,8 +308,10 @@ func WorkerNodeCallback(channel string, msgStr string) {
|
||||
log.Errorf(err.Error())
|
||||
debug.PrintStack()
|
||||
msgSd.Error = err.Error()
|
||||
msgSd.Log = err.Error()
|
||||
} else {
|
||||
msgSd.Log = string(logStr)
|
||||
}
|
||||
msgSd.Log = string(logStr)
|
||||
|
||||
// 序列化
|
||||
msgSdBytes, err := json.Marshal(&msgSd)
|
||||
|
||||
Reference in New Issue
Block a user