Versions in this module Expand all Collapse all v1 v1.0.0 Dec 18, 2023 Changes in this version + const DebugLevel + const ErrorLevel + const FatalLevel + const FieldKeyFile + const FieldKeyFunc + const FieldKeyLevel + const FieldKeyLogrusError + const FieldKeyMsg + const FieldKeyTime + const InfoLevel + const PanicLevel + const TraceLevel + const WarnLevel + var File_logproto_proto protoreflect.FileDescriptor + 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 GetLevel() logrus.Level + func GetLogger() *logrus.Logger + func Info(v ...interface{}) + func Infof(format string, v ...interface{}) + func Log(v ...interface{}) + func Logf(format string, v ...interface{}) + func Name(name string) + func Pretty(v ...interface{}) + func PrettyLog(l logrus.Level, v ...interface{}) + func PrettyLogf(l logrus.Level, format string, v ...interface{}) + func Prettyf(format string, v ...interface{}) + func RpcTrace(method string, request interface{}, response interface{}) + func SetCaller(isReport bool) + func SetLevel(l string) + func SetLoki(uri string) error + func Trace(v ...interface{}) + func Tracef(format string, v ...interface{}) + func Warn(v ...interface{}) + func Warnf(format string, v ...interface{}) + func WithLevel(l logrus.Level, v ...interface{}) + func WithLevelf(l logrus.Level, format string, v ...interface{}) + type CallerHook struct + func NewCallerHook(logger *logrus.Logger) *CallerHook + func (t *CallerHook) Fire(e *logrus.Entry) error + func (t *CallerHook) Levels() []logrus.Level + type Entry struct + Line string + Timestamp *timestamp.Timestamp + func (*Entry) Descriptor() ([]byte, []int) + func (*Entry) ProtoMessage() + func (x *Entry) GetLine() string + func (x *Entry) GetTimestamp() *timestamp.Timestamp + func (x *Entry) ProtoReflect() protoreflect.Message + func (x *Entry) Reset() + func (x *Entry) String() string + type FieldMap map[fieldKey]string + type Formatter interface + Format func(*logrus.Entry) ([]byte, error) + type JSONFormatter struct + CallerPrettyfier func(*runtime.Frame) (function string, file string) + DataKey string + DisableHTMLEscape bool + DisableTimestamp bool + FieldMap FieldMap + PrettyPrint bool + TimestampFormat string + func (f *JSONFormatter) Format(entry *logrus.Entry) ([]byte, error) + type Loki struct + BatchSize int + BatchWait time.Duration + LokiURL string + func NewLoki(URL string, service string, batchSize, batchWait int) (*Loki, error) + func (l *Loki) AddData(key, value string) + func (l *Loki) Close() + func (l *Loki) Fire(entry *logrus.Entry) error + func (l *Loki) Levels() []logrus.Level + type LokiFormatter struct + CallerPrettyfier func(*runtime.Frame) (function string, file string) + DisableColors bool + DisableLevelTruncation bool + DisableQuote bool + DisableSorting bool + DisableTimestamp bool + EnvironmentOverrideColors bool + FieldMap FieldMap + ForceColors bool + ForceQuote bool + FullTimestamp bool + PadLevelText bool + QuoteEmptyFields bool + SortingFunc func([]string) []string + TimestampFormat string + func (f *LokiFormatter) Format(entry *logrus.Entry) ([]byte, error) + type PushRequest struct + Streams []*Stream + func (*PushRequest) Descriptor() ([]byte, []int) + func (*PushRequest) ProtoMessage() + func (x *PushRequest) GetStreams() []*Stream + func (x *PushRequest) ProtoReflect() protoreflect.Message + func (x *PushRequest) Reset() + func (x *PushRequest) String() string + type Stream struct + Entries []*Entry + Labels string + func (*Stream) Descriptor() ([]byte, []int) + func (*Stream) ProtoMessage() + func (x *Stream) GetEntries() []*Entry + func (x *Stream) GetLabels() string + func (x *Stream) ProtoReflect() protoreflect.Message + func (x *Stream) Reset() + func (x *Stream) String() string + type TextFormatter struct + CallerPrettyfier func(*runtime.Frame) (function string, file string) + DisableColors bool + DisableLevelTruncation bool + DisableQuote bool + DisableSorting bool + DisableTimestamp bool + EnvironmentOverrideColors bool + FieldMap FieldMap + ForceColors bool + ForceQuote bool + FullTimestamp bool + PadLevelText bool + QuoteEmptyFields bool + SortingFunc func([]string) []string + TimestampFormat string + func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error)