logger

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) Tobias Schäfer. All rights reserved. Licensed under the MIT License, see LICENSE file in the project root for details.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Supported log levels
	Levels = []string{"debug", "info", "warn", "error"}
)

Functions

func Level

func Level() slog.Level

Level returns the current log level.

Types

type Logger

type Logger struct {
	Logger *slog.Logger
	Level  slog.Level
}

Logger is a wrapper around slog.Logger with a predefined log level.

func NewLogger added in v1.0.0

func NewLogger(levelStr string) (*Logger, error)

NewLogger creates a new Logger with the specified log level.

Jump to

Keyboard shortcuts

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