logsutil

package
v0.0.0-...-715e427 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Info  func(msg string, keysAndValues ...any)
	Error func(err error, msg string, keysAndValues ...any)
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(fileLog, appName string) (*Logger, error)

NewLogger builds and returns its own log struct which contains an implementation of {zap.SugaredLogger} library

func (Logger) Namespace

func (l Logger) Namespace(value string) Logger

Namespace adds key/value pair namespace:{value}

func (Logger) WithValues

func (l Logger) WithValues(keysAndValues ...any) Logger

WithValues returns a new Logger instance with additional key/value pairs

Jump to

Keyboard shortcuts

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