logger

package module
v0.0.0-...-7d786f5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package logger provides a wrapper around log that adds color support with github.com/fatih/color.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lshortfile

func Lshortfile(level int) string

Lshortfile is a re-implemented log.Lshortfile with a modifiable call level.

func LshortfileTree

func LshortfileTree() string

Types

type Logger

type Logger struct {
	Empty bool
	// contains filtered or unexported fields
}

func NewEmptyLogger

func NewEmptyLogger() (l *Logger)

func NewLogger

func NewLogger(out io.Writer, prefix string, flag int, color c.Attribute) (l *Logger)

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...interface{})

func (*Logger) Print

func (l *Logger) Print(v ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...interface{})

func (*Logger) PrintfCustomLevel

func (l *Logger) PrintfCustomLevel(level int, format string, v ...interface{})

func (*Logger) PrintfNoFile

func (l *Logger) PrintfNoFile(format string, v ...interface{})

func (*Logger) Println

func (l *Logger) Println(v ...interface{})

func (*Logger) SetFatalFunc

func (l *Logger) SetFatalFunc(f func(err interface{}))

Jump to

Keyboard shortcuts

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