Skip to content

Commit e929f89

Browse files
ConsoleMsg is not set by open source or AIStor, we should remove this an… (#5186)
ConsoleMsg is not set by open source or eos, we should remove this and correctly show Message only
1 parent 56f94fd commit e929f89

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cmd/admin-logs.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ func (l logMessage) String() string {
107107
if l.NodeName != "" {
108108
hostStr = fmt.Sprintf("%s ", colorizedNodeName(l.NodeName))
109109
}
110-
log := l.LogInfo
111-
if log.ConsoleMsg != "" {
112-
if strings.HasPrefix(log.ConsoleMsg, "\n") {
113-
fmt.Fprintf(b, "%s\n", hostStr)
114-
log.ConsoleMsg = strings.TrimPrefix(log.ConsoleMsg, "\n")
115-
}
116-
fmt.Fprintf(b, "%s %s", hostStr, log.ConsoleMsg)
117-
return b.String()
118-
}
119110
if l.API != nil {
120111
apiString := "API: " + l.API.Name + "("
121112
if l.API.Args != nil && l.API.Args.Bucket != "" {
@@ -142,6 +133,9 @@ func (l logMessage) String() string {
142133
if l.UserAgent != "" {
143134
fmt.Fprintf(b, "\n%s UserAgent: %s", hostStr, l.UserAgent)
144135
}
136+
if l.Message != "" {
137+
fmt.Fprintf(b, "\n%s Message: %s", hostStr, l.Message)
138+
}
145139
if l.Trace != nil {
146140
if l.Trace.Message != "" {
147141
fmt.Fprintf(b, "\n%s Error: %s", hostStr, console.Colorize("LogMessage", l.Trace.Message))

0 commit comments

Comments
 (0)