log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package log builds the process logger and the slog bridge the WNC SDK takes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Levels

func Levels() []string

Levels lists the accepted --log-level values, for the flag's usage string and for the error a rejected value produces. Three of logrus's seven: nothing emits at Info, Trace, Fatal or Panic, and the spellings come from logrus, where WarnLevel is "warning".

func New

func New(level string) (*logrus.Logger, error)

New builds the process logger. Diagnostics go to stderr so they never mix with the data on stdout, and color is disabled unconditionally because a TTY check would make the output differ between a terminal and a pipe.

func NewWithOutput

func NewWithOutput(w io.Writer, level string) (*logrus.Logger, error)

func SDKLogger

func SDKLogger(l *logrus.Logger) *slog.Logger

SDKLogger adapts the logger to the *slog.Logger the SDK accepts. Every SDK record is mapped to Debug because internal/show reports each controller failure itself, and Enabled consults the same mapper, so the SDK is silent at warning and above.

Types

This section is empty.

Jump to

Keyboard shortcuts

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