log

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ColorRed      = "\033[31m"
	ColorGreen    = "\033[32m"
	ColorYellow   = "\033[33m"
	ColorBlue     = "\033[34m"
	ColorPurple   = "\033[35m"
	ColorCyan     = "\033[36m"
	ColorWhite    = "\033[37m"
	ColorHiRed    = "\033[91m"
	ColorHiGreen  = "\033[92m"
	ColorHiYellow = "\033[93m"
	ColorHiBlue   = "\033[94m"
	ColorHiPurple = "\033[95m"
	ColorHiCyan   = "\033[96m"
	ColorHiWhite  = "\033[97m"
	ColorReset    = "\033[0m"
)

Variables

This section is empty.

Functions

func LogLvlToStr

func LogLvlToStr(l kiwi.TLevel) string

func NewMgo

func NewMgo(opts ...MgoOption) *mgoLogger

func NewStd

func NewStd(opts ...StdOption) *stdLogger

func TraceLvlToStr

func TraceLvlToStr(l kiwi.TLevel) string

Types

type MgoOption

type MgoOption func(opt *mgoOption)

func MgoClientOptions

func MgoClientOptions(opts *options.ClientOptions) MgoOption

func MgoDb

func MgoDb(db string) MgoOption

func MgoDbOptions

func MgoDbOptions(opts *options.DatabaseOptions) MgoOption

func MgoLogIdx

func MgoLogIdx(index ...mongo.IndexModel) MgoOption

func MgoLogLvl

func MgoLogLvl(levels ...string) MgoOption

func MgoLogOpt

func MgoLogOpt(option *options.CreateCollectionOptions) MgoOption

func MgoSpanIdx

func MgoSpanIdx(index ...mongo.IndexModel) MgoOption

func MgoSpanOpt

func MgoSpanOpt(option *options.CreateCollectionOptions) MgoOption

func MgoTimeLayout

func MgoTimeLayout(layout string) MgoOption

func MgoTraceIdx

func MgoTraceIdx(index ...mongo.IndexModel) MgoOption

func MgoTraceLvl

func MgoTraceLvl(levels ...string) MgoOption

func MgoTraceOpt

func MgoTraceOpt(option *options.CreateCollectionOptions) MgoOption

func MgoTtl

func MgoTtl(ttl int32) MgoOption

type StdOption

type StdOption func(opt *stdOption)

func StdColor

func StdColor(color bool) StdOption

func StdFile

func StdFile(file string) StdOption

func StdLogLvl

func StdLogLvl(levels ...kiwi.TLevel) StdOption

func StdLogStrLvl

func StdLogStrLvl(levels ...string) StdOption

func StdTimeLayout

func StdTimeLayout(layout string) StdOption

func StdTraceLvl

func StdTraceLvl(levels ...kiwi.TLevel) StdOption

func StdTraceStrLvl

func StdTraceStrLvl(levels ...string) StdOption

func StdWriter

func StdWriter(writer io.Writer) StdOption

Jump to

Keyboard shortcuts

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