Skip to content

Commit 1f0cad8

Browse files
remove unnecessary comments
1 parent c522834 commit 1f0cad8

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

internal/container/logfilter.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"github.com/localstack/lstk/internal/output"
77
)
88

9-
// shouldFilter returns true if the log line is identified as noise and should not be shown.
109
func shouldFilter(line string) bool {
1110
if strings.Contains(line, "Docker not available") {
1211
return true
@@ -23,17 +22,13 @@ func shouldFilter(line string) bool {
2322
return false
2423
}
2524

26-
// parseLogLine extracts the log level and logger name from a LocalStack log line.
2725
// Expected format: 2026-03-16T17:56:00.810 INFO --- [ MainThread] l.p.c.extensions.plugins : message
28-
// Returns LogLevelUnknown and empty string if the line does not match the expected format.
2926
func parseLogLine(line string) (output.LogLevel, string) {
30-
// Find the thread section separator
3127
sepIdx := strings.Index(line, " --- [")
3228
if sepIdx < 0 {
3329
return output.LogLevelUnknown, ""
3430
}
3531

36-
// Level is the last word before " --- ["
3732
prefix := strings.TrimSpace(line[:sepIdx])
3833
level := output.LogLevelUnknown
3934
if spIdx := strings.LastIndex(prefix, " "); spIdx >= 0 {
@@ -49,7 +44,6 @@ func parseLogLine(line string) (output.LogLevel, string) {
4944
}
5045
}
5146

52-
// Logger is between "] " and " : "
5347
rest := line[sepIdx+6:] // skip " --- ["
5448
bracketEnd := strings.Index(rest, "]")
5549
if bracketEnd < 0 {

internal/output/events.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ const (
141141
)
142142

143143
type LogLineEvent struct {
144-
Source string // use LogSource* constants
144+
Source string
145145
Line string
146-
Level LogLevel // parsed from the log line; LogLevelUnknown if not parseable
146+
Level LogLevel
147147
}
148148

149149
// Emit sends an event to the sink with compile-time type safety via generics.

internal/ui/logrender.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"github.com/localstack/lstk/internal/ui/styles"
88
)
99

10-
// renderLogLine renders a LocalStack log line with the metadata prefix (timestamp,
11-
// level, thread, logger) in grey and the message in a color matching the log level.
1210
func renderLogLine(line string, level output.LogLevel) string {
1311
idx := strings.Index(line, " : ")
1412
if idx < 0 {

0 commit comments

Comments
 (0)