logcli

package
v2.4.27 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package logcli implements a colored text handler suitable for command-line interfaces.

Index

Constants

This section is empty.

Variables

View Source
var Strings = [...]string{
	log.DebugLevel: "debug",
	log.InfoLevel:  " info",
	log.WarnLevel:  " warn",
	log.ErrorLevel: "error",
	log.FatalLevel: "error",
}

Strings mapping.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Writer  io.Writer
	Padding int
	// contains filtered or unexported fields
}

Handler implementation.

func New

func New(w io.Writer) *Handler

New handler.

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

Jump to

Keyboard shortcuts

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