log

package
v0.0.0-...-cf6d600 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: GPL-3.0-or-later

SPDX-License-Identifier: GPL-3.0-or-later

logger.go +build !debug

Index

Constants

View Source
const (
	COLOR_EMPTY int = iota
	COLOR_BLACK
	COLOR_RED
	COLOR_GREEN
	COLOR_YELLOW
	COLOR_BLUE
	COLOR_PURPLE
	COLOR_CYAN
	COLOR_WHITE
)
View Source
const (
	Verbose int = iota
	Info
	Warning
	Error
	None // no log at all
)

Variables

View Source
var (
	LogLevel     int
	ColorEnabled bool = true

	Log_File = os.Stderr
)
View Source
var COLOR_RESET string = "\033[0m"

Functions

func Debugf

func Debugf(format string, args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Flogf

func Flogf(out *os.File, typ string, format string, args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func Isatty

func Isatty(f *os.File) bool

func Logf

func Logf(format string, args ...interface{})

bypass the level, always print the log

func MiniFlogf

func MiniFlogf(out *os.File, format string, args ...interface{})

func Must

func Must(level int) bool

func Verbosef

func Verbosef(format string, args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type Color

type Color struct {
	BG_color int // background
	FG_color int // foreground
}

func (Color) Color_Fmt

func (c Color) Color_Fmt() string

func (Color) Printfmt

func (c Color) Printfmt(val string) string

Jump to

Keyboard shortcuts

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