Documentation
¶
Overview ¶
无任何依赖的包变量logger,适用于直接导包的场景,解决实例化结构体没logger的问题
- @Author: hugo
- @Date: 2024-03-20 17:17
- @LastEditors: hugo
- @LastEditTime: 2024-04-02 15:02
- @FilePath: \gotox\logx\zapBuilder.go
- @Description: *
- Copyright (c) 2024 by hugo, All Rights Reserved.
Index ¶
Constants ¶
View Source
const ( DEFAULTLOGFILE = "./log/dev.log" DEFAULTLOGLEVEl = "dev" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Debug(msg string, args ...any)
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
}
var Log Logger
func NewNoOpLogger ¶
func NewNoOpLogger() Logger
type NoOpLogger ¶
type NoOpLogger struct{}
func (*NoOpLogger) Debug ¶
func (n *NoOpLogger) Debug(msg string, args ...any)
func (*NoOpLogger) Error ¶
func (n *NoOpLogger) Error(msg string, args ...any)
func (*NoOpLogger) Info ¶
func (n *NoOpLogger) Info(msg string, args ...any)
func (*NoOpLogger) Warn ¶
func (n *NoOpLogger) Warn(msg string, args ...any)
Click to show internal directories.
Click to hide internal directories.