Documentation
¶
Index ¶
Constants ¶
View Source
const ( SubscriptionID string = "subscription_id" RequestID string = "request_id" CallerID string = "caller_id" Version string = "version" Global string = "global" Expiry string = "expiry" IncludeChildren string = "include_children" Path string = "path" Role string = "role" PathURL string = "path_url" PathWildCardURL string = "path_wild_card_url" )
Variables ¶
View Source
var DebugContextKeys = []string{SubscriptionID, RequestID}
DebugContextKeys defines variables from the context to be included in each log line
Functions ¶
func InitLogger ¶
Types ¶
type ContextHook ¶
type ContextHook struct {
// contains filtered or unexported fields
}
type FunctionNameHook ¶
type FunctionNameHook struct{}
FunctionNameHook is a zerolog.Hook that adds the function name to the logger's context.
func (FunctionNameHook) Levels ¶
func (h FunctionNameHook) Levels() []zerolog.Level
Levels returns the log levels that this hook should be enabled for.
type LoggingService ¶
type LoggingService interface {
Err(msg string, metadata map[string]any, err error)
ErrCtx(ctx context.Context, msg string, metadata map[string]any, err error)
Info(msg string, metadata map[string]any)
InfoCtx(ctx context.Context, msg string, metadata map[string]any)
Panic(msg string, metadata map[string]any)
PanicCtx(ctx context.Context, msg string, metadata map[string]any)
Debug(msg string, ctx map[string]any)
DebugCtx(ctx context.Context, msg string, metadata map[string]any)
}
Click to show internal directories.
Click to hide internal directories.