Documentation ¶
Index ¶
- func AppFileErrorLog(format string, a ...interface{}) error
- func Debugf(format string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func HookSystemLog(args map[string]string) zap.Option
- func Infof(format string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func NewFileSync(filename string, mode fsutil.WriterMode) zapcore.WriteSyncer
- func NewLogger(cfg *Config) *zap.Logger
- func Panicf(format string, args ...interface{})
- func Reset()
- func ServerErrorLog(format string, a ...interface{})
- func Setup(cfg *Config)
- func Warnf(format string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- func WriteFileLog(filename, format string, a ...interface{}) error
- type Config
- type Hooker
- type SyslogHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppFileErrorLog ¶
func NewFileSync ¶
func NewFileSync(filename string, mode fsutil.WriterMode) zapcore.WriteSyncer
func WriteFileLog ¶
Types ¶
type Config ¶
type Config struct { Level string // 等级 Filepath string // 日志文件 ErrFilepath string // err文件 IsProduction bool // 是否product模式 Conf *zap.Config }
配置参数
type SyslogHook ¶
type SyslogHook struct {
// contains filtered or unexported fields
}
SyslogHook to send logs via syslog.
func (*SyslogHook) Name ¶
func (h *SyslogHook) Name() string
Click to show internal directories.
Click to hide internal directories.