env

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogLevel

func LogLevel() slog.Level

LogLevel returns the logging level for the SPIKE components.

It reads from the SPIKE_SYSTEM_LOG_LEVEL environment variable and converts it to the corresponding slog.Level value. Valid values (case-insensitive) are:

  • "DEBUG": returns slog.LevelDebug
  • "INFO": returns slog.LevelInfo
  • "WARN": returns slog.LevelWarn
  • "ERROR": returns slog.LevelError

If the environment variable is not set or contains an invalid value, it returns the default level slog.LevelWarn.

Types

This section is empty.

Jump to

Keyboard shortcuts

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