fix: admin console logger changes to log.Info

This commit is contained in:
Harshavardhana
2020-03-20 15:13:41 -07:00
parent ae654831aa
commit b4bfdc92cc
4 changed files with 22 additions and 18 deletions

View File

@@ -22,7 +22,6 @@ import (
"net/http"
"net/url"
"strconv"
"strings"
)
// LogInfo holds console log messages
@@ -33,13 +32,6 @@ type LogInfo struct {
Err error `json:"-"`
}
// SendLog returns true if log pertains to node specified in args.
func (l LogInfo) SendLog(node, logKind string) bool {
nodeFltr := (node == "" || strings.EqualFold(node, l.NodeName))
typeFltr := strings.EqualFold(logKind, "all") || strings.EqualFold(l.LogKind, logKind)
return nodeFltr && typeFltr
}
// GetLogs - listen on console log messages.
func (adm AdminClient) GetLogs(ctx context.Context, node string, lineCnt int, logKind string) <-chan LogInfo {
logCh := make(chan LogInfo, 1)