Documentation ¶
Index ¶
- func NewLoggerWithOpt(opts ...logOpt) *loggerOpt
- func WithDisableConsole(disable bool) logOpt
- func WithLogLevel(level zapcore.Level) logOpt
- func WithLogPath(path string) logOpt
- func WithServiceName(serviceName string) logOpt
- type Logger
- type ZapLoggerAdapter
- func (z *ZapLoggerAdapter) Debug(msg string, args ...string)
- func (z *ZapLoggerAdapter) Error(msg string, args ...string)
- func (z *ZapLoggerAdapter) Fatal(msg string, args ...string)
- func (z *ZapLoggerAdapter) Info(msg string, args ...string)
- func (z *ZapLoggerAdapter) Panic(msg string, args ...string)
- func (z *ZapLoggerAdapter) Warn(msg string, args ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerWithOpt ¶
func NewLoggerWithOpt(opts ...logOpt) *loggerOpt
func WithDisableConsole ¶
func WithDisableConsole(disable bool) logOpt
func WithLogLevel ¶
func WithLogPath ¶
func WithLogPath(path string) logOpt
func WithServiceName ¶
func WithServiceName(serviceName string) logOpt
Types ¶
type ZapLoggerAdapter ¶
type ZapLoggerAdapter struct {
// contains filtered or unexported fields
}
func NewZapLoggerAdapter ¶
func NewZapLoggerAdapter(logger *zap.Logger) *ZapLoggerAdapter
func (*ZapLoggerAdapter) Debug ¶
func (z *ZapLoggerAdapter) Debug(msg string, args ...string)
func (*ZapLoggerAdapter) Error ¶
func (z *ZapLoggerAdapter) Error(msg string, args ...string)
func (*ZapLoggerAdapter) Fatal ¶
func (z *ZapLoggerAdapter) Fatal(msg string, args ...string)
func (*ZapLoggerAdapter) Info ¶
func (z *ZapLoggerAdapter) Info(msg string, args ...string)
func (*ZapLoggerAdapter) Panic ¶
func (z *ZapLoggerAdapter) Panic(msg string, args ...string)
func (*ZapLoggerAdapter) Warn ¶
func (z *ZapLoggerAdapter) Warn(msg string, args ...string)
Click to show internal directories.
Click to hide internal directories.