diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-26 19:53:43 -0500 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-01-26 19:53:43 -0500 |
commit | 49c677f6b46409289210abc0e0bda63735be3e9f (patch) | |
tree | 981c776636a70b59f2768c16883edccf3b18dd17 /app | |
parent | 9728b71f0839a6418f33df7a8188a801902a3a8e (diff) | |
download | chat-49c677f6b46409289210abc0e0bda63735be3e9f.tar.gz chat-49c677f6b46409289210abc0e0bda63735be3e9f.tar.bz2 chat-49c677f6b46409289210abc0e0bda63735be3e9f.zip |
Fix cluster logs (#5195)
Diffstat (limited to 'app')
-rw-r--r-- | app/admin.go | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/app/admin.go b/app/admin.go index c694285fa..51e69da57 100644 --- a/app/admin.go +++ b/app/admin.go @@ -19,6 +19,24 @@ import ( ) 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 if utils.Cfg.LogSettings.EnableFile { @@ -37,15 +55,6 @@ func GetLogs() ([]string, *model.AppError) { 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 } |