Documentation
¶
Index ¶
- Constants
- func AddHook(hook logrus.Hook)
- func Debug(ctx context.Context, args ...any)
- func Debugf(ctx context.Context, format string, args ...any)
- func EnsureTraceID(ctx context.Context) (context.Context, string)
- func Error(ctx context.Context, args ...any)
- func Errorf(ctx context.Context, format string, args ...any)
- func Fatal(ctx context.Context, args ...any)
- func Fatalf(ctx context.Context, format string, args ...any)
- func Info(ctx context.Context, args ...any)
- func Infof(ctx context.Context, format string, args ...any)
- func New(c *config.Logger) (func(), error)
- func Panic(ctx context.Context, args ...any)
- func Panicf(ctx context.Context, format string, args ...any)
- func SetOutput(out io.Writer)
- func SetVersion(v string)
- func Trace(ctx context.Context, args ...any)
- func Tracef(ctx context.Context, format string, args ...any)
- func Warn(ctx context.Context, args ...any)
- func Warnf(ctx context.Context, format string, args ...any)
- func WithFields(ctx context.Context, fields logrus.Fields) *logrus.Entry
- type ElasticSearchHook
- type Logger
- func (l *Logger) AddHook(hook logrus.Hook)
- func (l *Logger) Debug(ctx context.Context, args ...any)
- func (l *Logger) Debugf(ctx context.Context, format string, args ...any)
- func (l *Logger) Error(ctx context.Context, args ...any)
- func (l *Logger) Errorf(ctx context.Context, format string, args ...any)
- func (l *Logger) Fatal(ctx context.Context, args ...any)
- func (l *Logger) Fatalf(ctx context.Context, format string, args ...any)
- func (l *Logger) Info(ctx context.Context, args ...any)
- func (l *Logger) Infof(ctx context.Context, format string, args ...any)
- func (l *Logger) Init(c *config.Logger) (func(), error)
- func (l *Logger) Panic(ctx context.Context, args ...any)
- func (l *Logger) Panicf(ctx context.Context, format string, args ...any)
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) SetVersion(v string)
- func (l *Logger) Trace(ctx context.Context, args ...any)
- func (l *Logger) Tracef(ctx context.Context, format string, args ...any)
- func (l *Logger) Warn(ctx context.Context, args ...any)
- func (l *Logger) Warnf(ctx context.Context, format string, args ...any)
- type MeiliSearchHook
Constants ¶
View Source
const ( VersionKey = "version" SpanTitleKey = "title" SpanFunctionKey = "function" )
Key constants
Variables ¶
This section is empty.
Functions ¶
func EnsureTraceID ¶
EnsureTraceID ensures that a trace ID exists in the context.
Types ¶
type ElasticSearchHook ¶
type ElasticSearchHook struct {
// contains filtered or unexported fields
}
ElasticSearchHook represents an Elasticsearch log hook
func (*ElasticSearchHook) Fire ¶
func (h *ElasticSearchHook) Fire(entry *logrus.Entry) error
Fire sends log entry to Elasticsearch
func (*ElasticSearchHook) Levels ¶
func (h *ElasticSearchHook) Levels() []logrus.Level
Levels returns all log levels
type Logger ¶
Logger represents logger instance
func (*Logger) SetVersion ¶
SetVersion sets the version for logging
type MeiliSearchHook ¶
type MeiliSearchHook struct {
// contains filtered or unexported fields
}
MeiliSearchHook represents a MeiliSearch log hook
func (*MeiliSearchHook) Fire ¶
func (h *MeiliSearchHook) Fire(entry *logrus.Entry) error
Fire sends log entry to MeiliSearch
func (*MeiliSearchHook) Levels ¶
func (h *MeiliSearchHook) Levels() []logrus.Level
Levels returns all log levels
Click to show internal directories.
Click to hide internal directories.