initializers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Logger is the global logger instance that can be used throughout the application.

View Source
var StderrLogger logger.Logger

StderrLogger tracks the stderr logger for potential removal in TUI mode.

Functions

func DisableStderrLogger

func DisableStderrLogger()

DisableStderrLogger removes the stderr logger from the MultiLogger. This is useful for TUI mode to prevent log output from interfering with the display.

func InitDefaultLogger

func InitDefaultLogger()

InitDefaultLogger initializes basic logger

func InitLogger

func InitLogger(configs ...*logger.Config)

InitLogger initializes the global logger with the provided configurations. Each config creates a separate logger, and all are combined into a MultiLogger.

func InitMultiOutputLogger

func InitMultiOutputLogger(cfg MultiOutputConfig)

InitMultiOutputLogger creates a MultiLogger with one logger for stderr and one for a file.

func SetupTestLogger

func SetupTestLogger()

SetupTestLogger configures the global Logger to use a no-op implementation for testing.

Types

type MultiOutputConfig

type MultiOutputConfig struct {
	StderrLevel         logger.Level
	FileLevel           logger.Level
	FileWriter          io.Writer
	StderrOmitTimestamp bool
	FileOmitTimestamp   bool
	StderrAddSource     bool
	FileAddSource       bool
}

MultiOutputConfig holds configuration for initializing a multi-output logger.

Jump to

Keyboard shortcuts

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