logger

package
v0.0.0-...-fa23fe4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(cfg *Config) (*slog.Logger, error)

NewLogger creates a new logger based on the provided configuration.

Parameters: - cfg: a pointer to a Config struct that contains the configuration for the logger.

Returns: - logger: a pointer to a slog.Logger struct that represents the new logger instance. - error: an error if there was an issue creating the logger.

Types

type Config

type Config struct {
	LogFormatter string
	LogLevel     string
}

Jump to

Keyboard shortcuts

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