Documentation
¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(str string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(str string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(str string, args ...interface{})
- func Info(args ...interface{})
- func Infof(str string, args ...interface{})
- func Setting(option func(*Config))
- func Warn(args ...interface{})
- func Warnf(str string, args ...interface{})
- type Config
- type FileHook
- type ILogger
- type LineHook
- type LogrusLogger
- func (l *LogrusLogger) Debug(args ...interface{})
- func (l *LogrusLogger) Debugf(format string, args ...interface{})
- func (l *LogrusLogger) Error(args ...interface{})
- func (l *LogrusLogger) Errorf(format string, args ...interface{})
- func (l *LogrusLogger) Fatal(args ...interface{})
- func (l *LogrusLogger) Fatalf(format string, args ...interface{})
- func (l *LogrusLogger) Info(args ...interface{})
- func (l *LogrusLogger) Infof(format string, args ...interface{})
- func (l *LogrusLogger) Warn(args ...interface{})
- func (l *LogrusLogger) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
LogName string `toml:"log_name" json:"log_name"`
LogPath string `toml:"log_path" json:"log_path"`
LogMode string `toml:"log_mode" json:"log_mode"`
LogLevel string `toml:"log_level" json:"log_level"`
LogDetail bool `toml:"log_detail" json:"log_detail"`
LogMaxFiles int `toml:"log_max_files" json:"log_max_files"`
LogSentryDSN string `toml:"log_sentry_dsn" json:"log_sentry_dsn"`
LogSentryType string `toml:"log_sentry_type" json:"log_sentry_type"`
}
type FileHook ¶
type FileHook struct {
// contains filtered or unexported fields
}
FileHook to send logs via syslog.
func NewFileHook ¶
type ILogger ¶
type ILogger interface {
Fatalf(string, ...interface{})
Debugf(string, ...interface{})
Infof(string, ...interface{})
Warnf(string, ...interface{})
Errorf(string, ...interface{})
Fatal(...interface{})
Debug(...interface{})
Info(...interface{})
Warn(...interface{})
Error(...interface{})
}
ILogger is the logger interface
func NewLogrusLogger ¶
func NewLogrusLogger(option func(l *LogrusLogger)) ILogger
NewFileLogger providers a file logger based on logrus
type LineHook ¶
type LineHook struct {
// contains filtered or unexported fields
}
func NewLineHook ¶
type LogrusLogger ¶
LogrusLogger file logger
func (*LogrusLogger) Debug ¶
func (l *LogrusLogger) Debug(args ...interface{})
func (*LogrusLogger) Debugf ¶
func (l *LogrusLogger) Debugf(format string, args ...interface{})
func (*LogrusLogger) Error ¶
func (l *LogrusLogger) Error(args ...interface{})
func (*LogrusLogger) Errorf ¶
func (l *LogrusLogger) Errorf(format string, args ...interface{})
func (*LogrusLogger) Fatal ¶
func (l *LogrusLogger) Fatal(args ...interface{})
func (*LogrusLogger) Fatalf ¶
func (l *LogrusLogger) Fatalf(format string, args ...interface{})
func (*LogrusLogger) Info ¶
func (l *LogrusLogger) Info(args ...interface{})
func (*LogrusLogger) Infof ¶
func (l *LogrusLogger) Infof(format string, args ...interface{})
func (*LogrusLogger) Warn ¶
func (l *LogrusLogger) Warn(args ...interface{})
func (*LogrusLogger) Warnf ¶
func (l *LogrusLogger) Warnf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.