Skip to content

Commit

Permalink
fix: fixes grouping not working with unknown levels
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Jan 7, 2025
1 parent d79c517 commit 1896baa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/docker/event_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func createEvent(message string, streamType StdType) *LogEvent {
func checkPosition(currentEvent *LogEvent, nextEvent *LogEvent) {
currentLevel := guessLogLevel(currentEvent)
if nextEvent != nil {
if currentEvent.IsCloseToTime(nextEvent) && currentLevel != "" && !nextEvent.HasLevel() {
if currentEvent.IsCloseToTime(nextEvent) && currentLevel != "unknown" && !nextEvent.HasLevel() {
currentEvent.Position = Beginning
nextEvent.Position = Middle
}
Expand Down
2 changes: 1 addition & 1 deletion internal/docker/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type LogEvent struct {
}

func (l *LogEvent) HasLevel() bool {
return l.Level != ""
return l.Level != "unknown"
}

func (l *LogEvent) IsCloseToTime(other *LogEvent) bool {
Expand Down

0 comments on commit 1896baa

Please sign in to comment.