log

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG   = "[DEBUG] "
	WARN    = "[WARN] "
	INFO    = "[INFO] "
	SUCCESS = "[SUCCESS] "
	ERROR   = "[ERROR] "
	FATAL   = "[FATAL] "
)
View Source
const REMOVELEVEL = 10

REMOVELEVEL logrus stack level is 9, should be removed from stack trace

View Source
const ROOTCALLER = "main.main"

ROOTCALLER should be main proc

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug log info with color and symbol, for a notice

func Debugf

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

Debugf log info with color,symbol and format for a notice

func Error

func Error(args ...interface{})

Error log error with color adn symbol for a warning event

func Errorf

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

Errorf log error with color,symbol and format for a warning event

func Fatal

func Fatal(args ...interface{})

Fatal log fatal with color and symbol for a fatal event

func Fatalf

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

Fatalf log fatal with color,symbol and format for a fatal event

func Info

func Info(args ...interface{})

Info log info with color and symbol, for a notice

func Infof

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

Infof log info with color,symbol and format for a notice

func Separator

func Separator(args ...interface{})

Separator prints a line for separating as green color

func Separatorf

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

Separatorf prints a line for separating as green color

func Success

func Success(args ...interface{})

Success log success with color and symbol, for a success operation

func Successf

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

Successf log success with color,symbol and format for a success operation

func Warn

func Warn(args ...interface{})

Warn log warn with color and symbol, for a warning event

func Warnf

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

Warnf log warn with color,symbol and format for a warning event

Types

type CliLoggerFormatter

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

func (*CliLoggerFormatter) Format

func (m *CliLoggerFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format implement Format interface to output custom log

type SeparatorFormatter

type SeparatorFormatter struct{}

func (*SeparatorFormatter) Format

func (s *SeparatorFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format implement Format interface to output custom log

type Symbol

type Symbol string

type Symbols

type Symbols struct {
	Debug   Symbol
	Info    Symbol
	Warning Symbol
	Warn    Symbol
	Error   Symbol
	Fatal   Symbol
	Success Symbol
}

Symbols struct contains all symbols

func (Symbols) String

func (s Symbols) String() string

String returns a printable representation of Symbols struct

Jump to

Keyboard shortcuts

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