Add a closing tag when showing timestamp in log view (#1776)
parent
c35949189f
commit
489b841295
|
|
@ -73,6 +73,7 @@ func (l *LogItem) Render(paint string, showTime bool, bb *bytes.Buffer) {
|
|||
for i := len(l.Bytes[:index]); i < 30; i++ {
|
||||
bb.WriteByte(' ')
|
||||
}
|
||||
bb.WriteString("[-::]")
|
||||
}
|
||||
|
||||
if l.Pod != "" {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ func TestLogItemRender(t *testing.T) {
|
|||
ShowTimestamp: true,
|
||||
},
|
||||
log: fmt.Sprintf("%s %s\n", "2018-12-14T10:36:43.326972-07:00", "Testing 1,2,3..."),
|
||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [yellow::]fred [yellow::b]blee[-::-] Testing 1,2,3...\n",
|
||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [-::][yellow::]fred [yellow::b]blee[-::-] Testing 1,2,3...\n",
|
||||
},
|
||||
"log-level": {
|
||||
opts: dao.LogOptions{
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ func TestLogItemsRender(t *testing.T) {
|
|||
Container: "blee",
|
||||
ShowTimestamp: true,
|
||||
},
|
||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [teal::]fred [teal::b]blee[-::-] Testing 1,2,3...\n",
|
||||
e: "[gray::b]2018-12-14T10:36:43.326972-07:00 [-::][teal::]fred [teal::b]blee[-::-] Testing 1,2,3...\n",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue