MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / Logger

Interface Logger

api/pkg/telemetry/logger.go:8–38  ·  view source on GitHub ↗

Logger is an interface for creating customer logger implementations

Source from the content-addressed store, hash-verified

6
7// Logger is an interface for creating customer logger implementations
8type Logger interface {
9 // Error logs an error
10 Error(err error)
11
12 // WithService creates a new structured logger instance with a service name
13 WithService(string) Logger
14
15 // WithString creates a new structured logger instance with a string
16 WithString(key string, value string) Logger
17
18 // WithSpan creates a new structured logger instance for a spanContext
19 WithSpan(span trace.SpanContext) Logger
20
21 // Trace logs a new message with trace level.
22 Trace(value string)
23
24 // Info logs a new message with information level.
25 Info(value string)
26
27 // Warn logs a new message with warning level.
28 Warn(err error)
29
30 // Debug logs a new message with debug level.
31 Debug(value string)
32
33 // Fatal logs a new message with fatal level.
34 Fatal(err error)
35
36 // Printf makes the logger compatible with retryablehttp.Logger
37 Printf(string, ...interface{})
38}

Callers 56

mainFunction · 0.65
WrapErrorSpanMethod · 0.65
ErrorMethod · 0.65
TraceMethod · 0.65
ErrorMethod · 0.65
CacheMethod · 0.65
NewLiteContainerFunction · 0.65
NewContainerFunction · 0.65
NewUserHandlerValidatorFunction · 0.65

Implementers 2

zerologLoggerapi/pkg/telemetry/zerolog_logger.go
noopLoggerapi/pkg/services/message_service_test.

Calls

no outgoing calls

Tested by

no test coverage detected