loglevel

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogFormat added in v0.15.0

func SetLogFormat(backend envs.Backend)

SetLogFormat sets the logger's format to the one SHELLHUB_LOG_FORMAT names in backend.

func SetLogLevel

func SetLogLevel(backend envs.Backend)

SetLogLevel applies the level backend names: trace in development, and otherwise whatever SHELLHUB_LOG_LEVEL asks for, falling back to info.

func UseEnvs added in v0.15.0

func UseEnvs(backend envs.Backend)

UseEnvs sets the logger level to the one SHELLHUB_LOG_LEVEL names in backend and the log format to the one SHELLHUB_LOG_FORMAT names.

Types

type LogFormat added in v0.15.0

type LogFormat string

LogFormat represents how logger should print logs.

const (
	// LogFormatJSON format for JSON log.
	LogFormatJSON LogFormat = "json"
	// LogFormatText format for text log.
	LogFormatText LogFormat = "text"
)

Jump to

Keyboard shortcuts

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