console

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsColorSupported added in v1.11.1

func IsColorSupported() bool

IsColorSupported reports current environment allows for color printing.

Types

type Option

type Option func(*Writer)

func WithJSONFormat

func WithJSONFormat() Option

func WithLogLevel

func WithLogLevel(level zerolog.Level) Option

func WithNoColor

func WithNoColor() Option

func WithWriter

func WithWriter(out io.Writer) Option

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Writer

func (*Writer) Level

func (w *Writer) Level() zerolog.Level

Level returns the minimum level accepted by this writer.

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Write data to writer.

func (*Writer) WriteLevel

func (w *Writer) WriteLevel(level zerolog.Level, p []byte) (n int, err error)

WriteLevel writes data to writer with level info provided

Jump to

Keyboard shortcuts

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