MCPcopy
hub / github.com/redpanda-data/console / WithFormat

Function WithFormat

backend/pkg/logger/options.go:68–72  ·  view source on GitHub ↗

WithFormat sets the log output format. - FormatJSON: Structured JSON output - FormatText: Human-readable text format

(format Format)

Source from the content-addressed store, hash-verified

66// - FormatJSON: Structured JSON output
67// - FormatText: Human-readable text format
68func WithFormat(format Format) Option {
69 return func(c *config) {
70 c.format = format
71 }
72}
73
74// WithTimestampFormat sets a custom timestamp format for log entries.
75// Use Go's standard time package constants (time.RFC3339, time.DateTime, etc.)

Callers 8

TestLoggerMethodsFunction · 0.85
TestLoggerWithFunction · 0.85
TestStructuredLoggingFunction · 0.85
TestWithFormatFunction · 0.85
TestFormatOverrideFunction · 0.85
TestDurationFormattingFunction · 0.85
FatalStartupFunction · 0.85

Calls

no outgoing calls

Tested by 7

TestLoggerMethodsFunction · 0.68
TestLoggerWithFunction · 0.68
TestStructuredLoggingFunction · 0.68
TestWithFormatFunction · 0.68
TestFormatOverrideFunction · 0.68
TestDurationFormattingFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…