log

package
v1.13.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const Binding = "goravel.log"

Variables

This section is empty.

Functions

func NewWriter added in v1.2.3

func NewWriter(instance *logrus.Entry) log.Writer

Types

type Application

type Application struct {
	log.Writer
	// contains filtered or unexported fields
}

func NewApplication added in v1.8.1

func NewApplication(config config.Config) *Application

func (*Application) WithContext added in v1.12.0

func (r *Application) WithContext(ctx context.Context) log.Writer

type Entry added in v1.0.1

type Entry struct {
	// contains filtered or unexported fields
}

func (*Entry) Context added in v1.2.3

func (r *Entry) Context() context.Context

func (*Entry) Level added in v1.2.3

func (r *Entry) Level() log.Level

func (*Entry) Message added in v1.2.3

func (r *Entry) Message() string

func (*Entry) Time added in v1.2.3

func (r *Entry) Time() time.Time

type Hook added in v1.0.0

type Hook struct {
	// contains filtered or unexported fields
}

func (*Hook) Fire added in v1.0.0

func (h *Hook) Fire(entry *logrus.Entry) error

func (*Hook) Levels added in v1.0.0

func (h *Hook) Levels() []logrus.Level

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (log *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (log *ServiceProvider) Register(app foundation.Application)

type Writer added in v1.2.3

type Writer struct {
	// contains filtered or unexported fields
}

func (*Writer) Code added in v1.13.1

func (r *Writer) Code(code string) log.Writer

Code set a code or slug that describes the error. Error messages are intended to be read by humans, but such code is expected to be read by machines and even transported over different services.

func (*Writer) Debug added in v1.2.3

func (r *Writer) Debug(args ...any)

func (*Writer) Debugf added in v1.2.3

func (r *Writer) Debugf(format string, args ...any)

func (*Writer) Error added in v1.2.3

func (r *Writer) Error(args ...any)

func (*Writer) Errorf added in v1.2.3

func (r *Writer) Errorf(format string, args ...any)

func (*Writer) Fatal added in v1.2.3

func (r *Writer) Fatal(args ...any)

func (*Writer) Fatalf added in v1.2.3

func (r *Writer) Fatalf(format string, args ...any)

func (*Writer) Hint added in v1.13.1

func (r *Writer) Hint(hint string) log.Writer

Hint set a hint for faster debugging.

func (*Writer) In added in v1.13.1

func (r *Writer) In(domain string) log.Writer

In sets the feature category or domain in which the log entry is relevant.

func (*Writer) Info added in v1.2.3

func (r *Writer) Info(args ...any)

func (*Writer) Infof added in v1.2.3

func (r *Writer) Infof(format string, args ...any)

func (*Writer) Owner added in v1.13.1

func (r *Writer) Owner(owner any) log.Writer

Owner set the name/email of the colleague/team responsible for handling this error. Useful for alerting purpose.

func (*Writer) Panic added in v1.2.3

func (r *Writer) Panic(args ...any)

func (*Writer) Panicf added in v1.2.3

func (r *Writer) Panicf(format string, args ...any)

func (*Writer) Request added in v1.13.1

func (r *Writer) Request(req http.ContextRequest) log.Writer

Request supplies a http.Request.

func (*Writer) Response added in v1.13.1

func (r *Writer) Response(res http.ContextResponse) log.Writer

Response supplies a http.Response.

func (*Writer) Tags added in v1.13.1

func (r *Writer) Tags(tags ...string) log.Writer

Tags add multiple tags, describing the feature returning an error.

func (*Writer) User added in v1.13.1

func (r *Writer) User(user any) log.Writer

User sets the user associated with the log entry.

func (*Writer) Warning added in v1.2.3

func (r *Writer) Warning(args ...any)

func (*Writer) Warningf added in v1.2.3

func (r *Writer) Warningf(format string, args ...any)

func (*Writer) With added in v1.13.1

func (r *Writer) With(data map[string]any) log.Writer

With adds key-value pairs to the context of the log entry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL