Logger

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMiddleware

func AddMiddleware(middleware LoggerMiddleware)

func Log

func Log(level LoggerDomain.Level) LoggerDomain.Message

Types

type LoggerMiddleware

type LoggerMiddleware interface {
	Log(message StandardMessage)
}

type StandardMessage

type StandardMessage struct {
	Level LoggerDomain.Level

	Message  string
	File     string
	Line     int
	Function string
	Module   string
	Time     int64

	Fields log.Fields
}

func (StandardMessage) At

func (m StandardMessage) At(time int64) LoggerDomain.Message

func (StandardMessage) Msg

func (m StandardMessage) Msg(message string)

func (StandardMessage) WithContext

func (m StandardMessage) WithContext(ctx context.Context) LoggerDomain.Message

func (StandardMessage) WithField

func (m StandardMessage) WithField(key log.Path, value interface{}) LoggerDomain.Message

func (StandardMessage) WithFields

func (m StandardMessage) WithFields(fields log.Fields) LoggerDomain.Message

func (StandardMessage) WithLevel

func (m StandardMessage) WithLevel(level LoggerDomain.Level) LoggerDomain.Message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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