Documentation ¶
Index ¶
- Constants
- func CreateLogContext(ctx context.Context) context.Context
- func CreateOutgoingContext(ctx context.Context) context.Context
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type FileOutput
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Output(depth, level int, ctxStr, msg string)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- type LoggerWithContext
- func (l *LoggerWithContext) Debug(v ...interface{})
- func (l *LoggerWithContext) Debugf(format string, v ...interface{})
- func (l *LoggerWithContext) Error(v ...interface{})
- func (l *LoggerWithContext) Errorf(format string, v ...interface{})
- func (l *LoggerWithContext) Fatal(v ...interface{})
- func (l *LoggerWithContext) Fatalf(format string, v ...interface{})
- func (l *LoggerWithContext) Info(v ...interface{})
- func (l *LoggerWithContext) Infof(format string, v ...interface{})
- func (l *LoggerWithContext) Warn(v ...interface{})
- func (l *LoggerWithContext) Warnf(format string, v ...interface{})
Constants ¶
View Source
const ( DEBUG = iota INFO WARN ERROR FATAL )
View Source
const ( CtxKey = "ctx-key" XTraceId = "x-trace-id" XUserId = "x-user-id" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileOutput ¶
type FileOutput struct {
// contains filtered or unexported fields
}
func NewFileOutput ¶
func NewFileOutput(dir, logname string) *FileOutput
type LoggerWithContext ¶
type LoggerWithContext struct {
// contains filtered or unexported fields
}
func With ¶
func With(ctx context.Context) *LoggerWithContext
func (*LoggerWithContext) Debug ¶
func (l *LoggerWithContext) Debug(v ...interface{})
func (*LoggerWithContext) Debugf ¶
func (l *LoggerWithContext) Debugf(format string, v ...interface{})
func (*LoggerWithContext) Error ¶
func (l *LoggerWithContext) Error(v ...interface{})
func (*LoggerWithContext) Errorf ¶
func (l *LoggerWithContext) Errorf(format string, v ...interface{})
func (*LoggerWithContext) Fatal ¶
func (l *LoggerWithContext) Fatal(v ...interface{})
func (*LoggerWithContext) Fatalf ¶
func (l *LoggerWithContext) Fatalf(format string, v ...interface{})
func (*LoggerWithContext) Info ¶
func (l *LoggerWithContext) Info(v ...interface{})
func (*LoggerWithContext) Infof ¶
func (l *LoggerWithContext) Infof(format string, v ...interface{})
func (*LoggerWithContext) Warn ¶
func (l *LoggerWithContext) Warn(v ...interface{})
func (*LoggerWithContext) Warnf ¶
func (l *LoggerWithContext) Warnf(format string, v ...interface{})
Click to show internal directories.
Click to hide internal directories.