Documentation ¶
Index ¶
- func GetTraceID(ctx context.Context) int64
- func PutTraceID(ctx context.Context, traceID int64) context.Context
- type ContextKey
- type Fields
- type Loggable
- type Logger
- type LogrusEntry
- func (e LogrusEntry) Debug(ctx context.Context, msg string, loggables ...Loggable)
- func (e LogrusEntry) Error(ctx context.Context, msg string, loggables ...Loggable)
- func (e LogrusEntry) Fatal(ctx context.Context, msg string, loggables ...Loggable)
- func (e LogrusEntry) ForClass(pkg string, class string) Logger
- func (e LogrusEntry) Info(ctx context.Context, msg string, loggables ...Loggable)
- func (e LogrusEntry) SetOutput(w io.Writer)
- func (e LogrusEntry) Warn(ctx context.Context, msg string, loggables ...Loggable)
- type LogrusFields
- type LogrusLogger
- func (l LogrusLogger) Debug(ctx context.Context, msg string, loggables ...Loggable)
- func (l LogrusLogger) Error(ctx context.Context, msg string, loggables ...Loggable)
- func (l LogrusLogger) Fatal(ctx context.Context, msg string, loggables ...Loggable)
- func (l LogrusLogger) ForClass(pkg string, class string) Logger
- func (l LogrusLogger) Info(ctx context.Context, msg string, loggables ...Loggable)
- func (l LogrusLogger) SetOutput(w io.Writer)
- func (l LogrusLogger) Warn(ctx context.Context, msg string, loggables ...Loggable)
- type LogrusLoggerProperties
- type MapFields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceID ¶
Types ¶
type ContextKey ¶
type ContextKey string
const (
ContextKeyTraceID ContextKey = "logContextKeyTraceID"
)
type Logger ¶
type Logger interface { ForClass(pkg string, class string) Logger SetOutput(io.Writer) Debug(ctx context.Context, msg string, loggable ...Loggable) Info(ctx context.Context, msg string, loggable ...Loggable) Warn(ctx context.Context, msg string, loggable ...Loggable) Error(ctx context.Context, msg string, loggable ...Loggable) Fatal(ctx context.Context, msg string, loggable ...Loggable) }
func NewLogrus ¶
func NewLogrus(properties LogrusLoggerProperties) Logger
type LogrusEntry ¶
type LogrusEntry struct {
// contains filtered or unexported fields
}
func (LogrusEntry) Debug ¶
func (e LogrusEntry) Debug(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusEntry) Error ¶
func (e LogrusEntry) Error(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusEntry) Fatal ¶
func (e LogrusEntry) Fatal(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusEntry) Info ¶
func (e LogrusEntry) Info(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusEntry) SetOutput ¶
func (e LogrusEntry) SetOutput(w io.Writer)
type LogrusFields ¶
type LogrusFields struct {
// contains filtered or unexported fields
}
func (*LogrusFields) Add ¶
func (f *LogrusFields) Add(key string, value interface{})
type LogrusLogger ¶
type LogrusLogger struct {
// contains filtered or unexported fields
}
func (LogrusLogger) Debug ¶
func (l LogrusLogger) Debug(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusLogger) Error ¶
func (l LogrusLogger) Error(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusLogger) Fatal ¶
func (l LogrusLogger) Fatal(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusLogger) Info ¶
func (l LogrusLogger) Info(ctx context.Context, msg string, loggables ...Loggable)
func (LogrusLogger) SetOutput ¶
func (l LogrusLogger) SetOutput(w io.Writer)
type LogrusLoggerProperties ¶
Click to show internal directories.
Click to hide internal directories.