Documentation ¶
Index ¶
- Constants
- Variables
- func CloseTracer(stage *Stage)
- func DefaultLogConfig(fileName string) *lumberjack.Logger
- func InitSlog(debugMode bool, logger *lumberjack.Logger, opts *slog.HandlerOptions)
- func InitTracer(stage *Stage, enabled bool, serviceName string, grpcTarget string)
- type LogBody
- type Stage
- type Tracer
Constants ¶
View Source
const ( ErrorKey = "Error" TraceIdKey = "TraceId" )
Variables ¶
View Source
var EnableTracer = false
Functions ¶
func CloseTracer ¶
func CloseTracer(stage *Stage)
func DefaultLogConfig ¶
func DefaultLogConfig(fileName string) *lumberjack.Logger
func InitSlog ¶
func InitSlog(debugMode bool, logger *lumberjack.Logger, opts *slog.HandlerOptions)
InitSlog init slog with log file name. if debugMode is true, slog will print log to stdout and do not write to file.
Types ¶
Click to show internal directories.
Click to hide internal directories.