logger

package
v0.0.0-...-439e08d Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component

func Component(opts ...Option) component.Component

func Object

func Object(c *component.Container) (logger.Logger, error)

Types

type Config

type Config struct {
	Level  string `dm:"level" env:"LEVEL"`
	Output string `dm:"output" env:"OUTPUT"`
	Syslog struct {
		Facility int `dm:"facility" env:"FACILITY"`
	} `dm:"syslog" envPrefix:"SYSLOG_"`
}

type Logger

type Logger struct {
	logger.Logger
	// contains filtered or unexported fields
}

func New

func New(app *application.Application, opts ...Option) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close() error

type Option

type Option func(l *Logger) error

func WithConfig

func WithConfig(app *application.Application, fn func() (*Config, error)) Option

func WithLevel

func WithLevel(level logger.Level) Option

func WithOutput

func WithOutput(output logger.Output) Option

Jump to

Keyboard shortcuts

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