alog

package
v0.0.0-...-58e3b6f Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset   = "\033[0m"
	ColorError   = "\033[31m"
	ColorWarning = "\033[33m"
	ColorNotice  = "\033[34m"
	ColorDebug   = "\033[35m"
	ColorSuccess = "\033[32m"
)
View Source
const LogErrorPattern = "\u001B[0m%s [\u001B[31mERROR\u001B[0m] [\u001B[32m%s\u001B[0m] %s"
View Source
const LogFatalPattern = "\u001B[0m%s [\u001B[31mFATAL\u001B[0m] [\u001B[32m%s\u001B[0m] %s"
View Source
const LogInfoPattern = "\u001B[0m%s [\u001B[34mINFO\u001B[0m] [\u001B[32m%s\u001B[0m] %s"
View Source
const LogWarningPattern = "\u001B[0m%s [\u001B[33mWARNING\u001B[0m] [\u001B[32m%s\u001B[0m] %s"

Variables

This section is empty.

Functions

func LogTime

func LogTime(timeNow int64) string

LogTime выводит время в заданном формате для логов

func LogTimeNow

func LogTimeNow() string

LogTimeNow выводит текущего время в заданном формате для логов

Types

type Alog

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

func NewLogger

func NewLogger(name string) *Alog

func (*Alog) Error

func (l *Alog) Error(message string)

func (*Alog) Errorf

func (l *Alog) Errorf(format string, params ...interface{})

func (*Alog) Fatal

func (l *Alog) Fatal(message string)

func (*Alog) Fatalf

func (l *Alog) Fatalf(format string, params ...interface{})

func (*Alog) Info

func (l *Alog) Info(message string)

func (*Alog) Infof

func (l *Alog) Infof(format string, params ...interface{})

func (*Alog) Warn

func (l *Alog) Warn(message string)

func (*Alog) Warnf

func (l *Alog) Warnf(format string, params ...interface{})

Jump to

Keyboard shortcuts

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