Documentation ¶
Index ¶
- Variables
- func NewLogger(opts ...Options) kiko_logger.Logger
- type KLLogger
- func (l *KLLogger) AddHooks(hooks ...logrus.Hook)
- func (l *KLLogger) Debug(args ...interface{})
- func (l *KLLogger) Debugf(template string, args ...interface{})
- func (l *KLLogger) Error(args ...interface{})
- func (l *KLLogger) Errorf(template string, args ...interface{})
- func (l *KLLogger) Fatal(args ...interface{})
- func (l *KLLogger) Fatalf(template string, args ...interface{})
- func (l *KLLogger) Info(args ...interface{})
- func (l *KLLogger) Infof(template string, args ...interface{})
- func (l *KLLogger) Option() *Option
- func (l *KLLogger) SetLevel(lv kiko_logger.Level)
- func (l *KLLogger) StdLog() *log.Logger
- func (l *KLLogger) Sync() error
- func (l *KLLogger) Warn(args ...interface{})
- func (l *KLLogger) Warnf(template string, args ...interface{})
- func (l *KLLogger) WithCallDepth(callDepth int) kiko_logger.Logger
- func (l *KLLogger) WithContext(ctx context.Context) kiko_logger.Logger
- func (l *KLLogger) WithError(err error) kiko_logger.Logger
- func (l *KLLogger) WithFields(fields map[string]interface{}) kiko_logger.Logger
- type Level
- type Option
- type Options
- func WithFileName(fileName string) Options
- func WithFormatter(formatter logrus.Formatter) Options
- func WithHook(hook ...logrus.Hook) Options
- func WithLevel(level Level) Options
- func WithOutPut(output ...io.Writer) Options
- func WithRotateLog(rotateOpts ...rotatelogs.Option) Options
- func WithStdOut(stdout bool) Options
- func WithTimeFormat(timeStr string) Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LevelMap = map[kLogger.Level]logrus.Level{ kLogger.DebugLevel: logrus.InfoLevel, kLogger.ErrorLevel: logrus.ErrorLevel, kLogger.WarnLevel: logrus.WarnLevel, kLogger.FatalLevel: logrus.FatalLevel, kLogger.InfoLevel: logrus.InfoLevel, } )
Functions ¶
Types ¶
type KLLogger ¶
type KLLogger struct {
// contains filtered or unexported fields
}
func (*KLLogger) WithCallDepth ¶
func (*KLLogger) WithContext ¶
func (*KLLogger) WithFields ¶
type Options ¶
type Options func(o *Option)
func WithFileName ¶
func WithFormatter ¶
func WithOutPut ¶
func WithStdOut ¶
func WithTimeFormat ¶
Click to show internal directories.
Click to hide internal directories.