fix(log): clear bold log format after timestamp (#2229)
parent
4061c03851
commit
13c25dd000
|
|
@ -73,7 +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("[-::]")
|
||||
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