Documentation ¶
Index ¶
- Variables
- func Debug(ctx context.Context, msg string, attributes ...zap.Field)
- func Error(ctx context.Context, msg string, attributes ...zap.Field)
- func GetFileWithLineNum() string
- func Info(ctx context.Context, msg string, attributes ...zap.Field)
- func InitLog(l *zap.Logger)
- func LoggerClose(ctx context.Context)
- func SetContext(ctx context.Context, traceArgs ...string) context.Context
- func SetContextLogger(ctx context.Context, logger *Logger) context.Context
- func Warn(ctx context.Context, msg string, attributes ...zap.Field)
- type Logger
- type ModOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GVA_LOG *zap.Logger
)
Functions ¶
func GetFileWithLineNum ¶
func GetFileWithLineNum() string
func LoggerClose ¶
Types ¶
type Logger ¶
type Logger struct { *zap.Logger sync.RWMutex Opts *Options `json:"opts"` TaskId string // contains filtered or unexported fields }
func NewLogger ¶
func NewLogger(flag string, mod ...ModOptions) *Logger
type ModOptions ¶
type ModOptions func(options *Options)
Click to show internal directories.
Click to hide internal directories.