Fix cluster logs (#5195)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
9728b71f08
Коммит
49c677f6b4
27
app/admin.go
27
app/admin.go
@@ -19,6 +19,24 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func GetLogs() ([]string, *model.AppError) {
|
func GetLogs() ([]string, *model.AppError) {
|
||||||
|
lines, err := GetLogsSkipSend()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if einterfaces.GetClusterInterface() != nil {
|
||||||
|
clines, err := einterfaces.GetClusterInterface().GetLogs()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
lines = append(lines, clines...)
|
||||||
|
}
|
||||||
|
|
||||||
|
return lines, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetLogsSkipSend() ([]string, *model.AppError) {
|
||||||
var lines []string
|
var lines []string
|
||||||
|
|
||||||
if utils.Cfg.LogSettings.EnableFile {
|
if utils.Cfg.LogSettings.EnableFile {
|
||||||
@@ -37,15 +55,6 @@ func GetLogs() ([]string, *model.AppError) {
|
|||||||
lines = append(lines, "")
|
lines = append(lines, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
if einterfaces.GetClusterInterface() != nil {
|
|
||||||
clines, err := einterfaces.GetClusterInterface().GetLogs()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
lines = append(lines, clines...)
|
|
||||||
}
|
|
||||||
|
|
||||||
return lines, nil
|
return lines, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user