Documentation ¶
Index ¶
- Constants
- Variables
- func FromPanic(rec interface{}) error
- type Entry
- func New() *Entry
- func NewWithJSONFormatter() (result *Entry)
- func NewWithLevel(level Level) (result *Entry)
- func NewWithLevelFormatter(level Level, formatter Formatter) (result *Entry)
- func NewWithLevelFormatterOut(level Level, formatter Formatter, out io.Writer) (result *Entry)
- func NewWithLevelJSONFormatter(level Level) (result *Entry)
- func (e *Entry) AddHook(hook Hook)
- func (e *Entry) AddLogrusHook(hook logrus.Hook)
- func (e *Entry) Debug(args ...interface{})
- func (e *Entry) Debugf(format string, args ...interface{})
- func (e *Entry) Error(args ...interface{})
- func (e *Entry) Errorf(format string, args ...interface{})
- func (e *Entry) Info(args ...interface{})
- func (e *Entry) Infof(format string, args ...interface{})
- func (e *Entry) Panic(args ...interface{})
- func (e *Entry) Panicf(format string, args ...interface{})
- func (e *Entry) SetLevel(level Level) *Entry
- func (e *Entry) SetLoggerOut(writer io.Writer) *Entry
- func (e *Entry) Warn(args ...interface{})
- func (e *Entry) Warnf(format string, args ...interface{})
- func (e *Entry) WithError(err error) *Entry
- func (e *Entry) WithField(key string, value interface{}) *Entry
- func (e *Entry) WithFields(fields F) *Entry
- func (e *Entry) WithRecover(recoverData interface{}) *Entry
- func (e *Entry) WithStack(err error) *Entry
- type F
- type FError
- type FieldedEntityI
- type FieldedErrorI
- type Formatter
- type Hook
- type Level
- type Stackable
Constants ¶
const NilValueToLog = "<nil>"
DEPRECATED: Use logan/v3 instead
Variables ¶
var ( ErrorKey = logrus.ErrorKey StackKey = "stack" )
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, }
DEPRECATED: Use logan/v3 instead
Functions ¶
Types ¶
type Entry ¶
DEPRECATED: Use logan/v3 instead
func NewWithJSONFormatter ¶
func NewWithJSONFormatter() (result *Entry)
DEPRECATED: Use logan/v3 instead
func NewWithLevelFormatter ¶
DEPRECATED: Use logan/v3 instead
func NewWithLevelFormatterOut ¶
DEPRECATED: Use logan/v3 instead
func NewWithLevelJSONFormatter ¶
DEPRECATED: Use logan/v3 instead
func (*Entry) AddLogrusHook ¶
DEPRECATED: Use logan/v3 instead
func (*Entry) Debug ¶
func (e *Entry) Debug(args ...interface{})
Debug logs a message at the debug severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Debugf ¶
Debugf logs a message at the debug severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Error ¶
func (e *Entry) Error(args ...interface{})
Error logs a message at the Error severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Errorf ¶
Errorf logs a message at the Error severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Info ¶
func (e *Entry) Info(args ...interface{})
Info logs a message at the Info severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Panic ¶
func (e *Entry) Panic(args ...interface{})
Panic logs a message at the Panic severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) Panicf ¶
Panicf logs a message at the Panic severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) SetLoggerOut ¶
DEPRECATED: Use logan/v3 instead
func (*Entry) Warn ¶
func (e *Entry) Warn(args ...interface{})
Warn logs a message at the Warn severity.
DEPRECATED: Use logan/v3 instead
func (*Entry) WithFields ¶
DEPRECATED: DEPRECATED: Use logan/v3 instead
func (*Entry) WithRecover ¶
WithRecover creates `go-errors.Error` error from the `recoverData` and returns Entry with this error and its stack.
DEPRECATED: Use logan/v3 instead
type FError ¶
type FError struct {
// contains filtered or unexported fields
}
DEPRECATED: Use logan/v3 instead
func (*FError) WithField ¶
func (e *FError) WithField(key string, value interface{}) FieldedErrorI
WithField returns the same instance
DEPRECATED: Use logan/v3 instead
func (*FError) WithFields ¶
func (e *FError) WithFields(fields F) FieldedErrorI
WithFields returns the same instance
DEPRECATED: Use logan/v3 instead
type FieldedEntityI ¶
type FieldedEntityI interface {
GetLogFields() F
}
DEPRECATED: Use logan/v3 instead
type FieldedErrorI ¶
type FieldedErrorI interface { // DEPRECATED Error() string // DEPRECATED Fields() F // DEPRECATED WithField(key string, value interface{}) FieldedErrorI // DEPRECATED WithFields(fields F) FieldedErrorI }
DEPRECATED: Use logan/v3 instead
func Wrap ¶
func Wrap(base error, msg string) FieldedErrorI
If base is nil, Wrap returns nil.
DEPRECATED: Use logan/v3 instead