Add a closing tag when showing timestamp in log view (#1776)

mine
Richard Hull 2022-09-25 15:35:29 +01:00 committed by GitHub
parent c35949189f
commit 489b841295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -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 != "" {

View File

@ -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{

View File

@ -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",
},
}