log

package
v0.0.0-...-ff8f6dd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

This is a wrapper for the zap framework no SugerLogger, Only Logger @author: 胖胖的ALEX example:

Log().Debug("debug log test")
Log().Info("info log test")
Log().Warn("warn log test")
Log().Error("error log test")
Log().Panic("panic log test")
Log().Fatal("fatal log test")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

func Error

func Error(msg string, fields ...zap.Field)

func Fatal

func Fatal(msg string, fields ...zap.Field)

func Info

func Info(msg string, fields ...zap.Field)

func Log

func Log() *zap.Logger

singleton pattern

func Panic

func Panic(msg string, fields ...zap.Field)

func Warn

func Warn(msg string, fields ...zap.Field)

Types

type Color

type Color struct {
	Info     func(a ...any) string
	Low      func(a ...any) string
	Midium   func(a ...any) string
	High     func(a ...any) string
	Critical func(a ...any) string
	Vulner   func(a ...any) string
	Time     func(a ...any) string
	Title    func(a ...any) string
	Banner   func(a ...any) string
	Bold     func(a ...any) string
	Red      func(a ...any) string
	Green    func(a ...any) string
}
var LogColor *Color

func NewColor

func NewColor() *Color

func (*Color) GetColor

func (c *Color) GetColor(level string, log string) string

Jump to

Keyboard shortcuts

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