logger

package
v0.0.0-...-3f0f867 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*slog.Logger

	Sugar *zap.SugaredLogger
	// contains filtered or unexported fields
}

Contains data to zapLogger and Sugar in some scenario

func NewConsole

func NewConsole(logFolder string, enableDebug bool, onlyLogFile bool) (*Config, error)

Use this function to print logs more friendly on user terminal while keep file logs readable for maintance

func NewJson

func NewJson(logFolder string, enableDebug bool) (*Config, error)

Use this function to print logs as json, very useful for APIs files logs will be storage as json as well

func (*Config) Sync

func (l *Config) Sync()

Jump to

Keyboard shortcuts

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