Documentation
¶
Overview ¶
Package logger is unified facade provided by Dubbo to work with different logger frameworks, eg, Zapper, Logrus.
Index ¶
- func SetLogger(log Logger)
- func SetLoggerLevel(level string) bool
- type Config
- type Logger
- type OpsLogger
- type Option
- func WithAppender(appender string) Option
- func WithFileCompress() Option
- func WithFileMaxAge(age int) Option
- func WithFileMaxBackups(backups int) Option
- func WithFileMaxSize(size int) Option
- func WithFileName(name string) Option
- func WithFormat(format string) Option
- func WithLevel(level string) Option
- func WithLogrus() Option
- func WithZap() Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogger ¶ added in v3.3.1
func SetLogger(log Logger)
SetLogger sets logger for dubbo and getty
func SetLoggerLevel ¶ added in v3.3.1
SetLoggerLevel is used to set the logger level.
Types ¶
type Config ¶ added in v3.3.1
type Config struct {
LumberjackConfig *lumberjack.Logger `yaml:"lumberjack-config"`
ZapConfig *zap.Config `yaml:"zap-config"`
CallerSkip int
}
type Logger ¶ added in v3.3.1
type Option ¶ added in v3.3.0
type Option func(*Options)
func WithAppender ¶ added in v3.3.0
func WithFileCompress ¶ added in v3.3.0
func WithFileCompress() Option
func WithFileMaxAge ¶ added in v3.3.0
func WithFileMaxBackups ¶ added in v3.3.0
func WithFileMaxSize ¶ added in v3.3.0
func WithFileName ¶ added in v3.3.0
func WithFormat ¶ added in v3.3.0
func WithLogrus ¶ added in v3.3.0
func WithLogrus() Option
type Options ¶ added in v3.3.0
type Options struct {
Logger *global.LoggerConfig
}
func NewOptions ¶ added in v3.3.0
Click to show internal directories.
Click to hide internal directories.