console

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package console provides console logging related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultWriter

func NewDefaultWriter() io.Writer

NewWriter creates a new io.Writer with default options for console logging.

func NewWriter

func NewWriter(out *os.File, color Color, timeFormat string) io.Writer

NewWriter creates a new io.Writer for console logging.

Types

type Color

type Color int

Console color mode

const (
	// Auto-detect coloring
	ColorAuto Color = -1
	// Force coloring off
	ColorOff Color = 0
	// Force coloring on
	ColorOn Color = 1
)

type YAMLConsoleConfig

type YAMLConsoleConfig struct {
	EnabledOption    bool   `yaml:"enabled"`
	OutOption        string `yaml:"out"`
	ColorOption      string `yaml:"color"`
	TimeFormatOption string `yaml:"timeformat"`
}

func (*YAMLConsoleConfig) NewWriter

func (config *YAMLConsoleConfig) NewWriter() io.Writer

Jump to

Keyboard shortcuts

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