Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions glg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1503,14 +1503,13 @@ func (g *Glg) blankFormat(l int) string {
if g.enableJSON {
return ""
}
if l == 0 {
return ""
}
if dfl > l {
return df[:l*3-1]
}
format := df
for c := l / dfl; c >= 0; c-- {
format += df
}
return format[:l*3-1]
return strings.Repeat(df, (l+dfl-1)/dfl)[:l*3-1]
}

// isModeEnable returns the level has already turned on the logging
Expand Down