Documentation ¶
Index ¶
- Constants
- func CreateCtx(ctx context.Context, logger *zap.Logger) context.Context
- func GetLog(ctx context.Context) *zap.Logger
- func L() *zap.Logger
- func S() *zap.SugaredLogger
- type ExtLog
- type Logger
- type ModuleLogger
- func (t *ModuleLogger) Depth(depth ...int) *zap.Logger
- func (t *ModuleLogger) If(ok bool, logFn func(log *ModuleLogger))
- func (t *ModuleLogger) IfDebug(fn func(log *ModuleLogger))
- func (t *ModuleLogger) IfError(fn func(log *ModuleLogger))
- func (t *ModuleLogger) L() *zap.Logger
- func (t *ModuleLogger) S() *zap.SugaredLogger
- func (t *ModuleLogger) With(args typex.M) *zap.Logger
- func (t *ModuleLogger) WithErr(err error, fields ...zap.Field) *zap.Logger
- func (t *ModuleLogger) WithFunc(fn interface{}) *zap.Logger
Constants ¶
View Source
const Name = "logging"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
func NewWithCfg ¶
func NewWithCfg(cfg *log_config.Config) *Logger
type ModuleLogger ¶ added in v0.2.4
type ModuleLogger struct {
// contains filtered or unexported fields
}
func ModuleLog ¶ added in v0.2.4
func ModuleLog(log *Logger, name string, fields ...zap.Field) *ModuleLogger
ModuleLog 命名的log
func (*ModuleLogger) If ¶ added in v0.2.4
func (t *ModuleLogger) If(ok bool, logFn func(log *ModuleLogger))
func (*ModuleLogger) IfDebug ¶ added in v0.2.4
func (t *ModuleLogger) IfDebug(fn func(log *ModuleLogger))
func (*ModuleLogger) IfError ¶ added in v0.2.4
func (t *ModuleLogger) IfError(fn func(log *ModuleLogger))
func (*ModuleLogger) L ¶ added in v0.2.4
func (t *ModuleLogger) L() *zap.Logger
func (*ModuleLogger) S ¶ added in v0.2.4
func (t *ModuleLogger) S() *zap.SugaredLogger
func (*ModuleLogger) WithFunc ¶ added in v0.2.4
func (t *ModuleLogger) WithFunc(fn interface{}) *zap.Logger
Click to show internal directories.
Click to hide internal directories.