log

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package log is a wrapper of logrus.

Index

Constants

This section is empty.

Variables

View Source
var JSONFormat bool

JSONFormat print log in json format

Functions

func Crit

func Crit(msg string, ctx ...interface{})

Crit alias of `Fatal`

func Critf

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

Critf alias of `Fatalf`

func Critln

func Critln(msg string, ctx ...interface{})

Critln alias of `Fatalln`

func Debug

func Debug(msg string, ctx ...interface{})

Debug debug

func Debugf

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

Debugf debugf

func Debugln

func Debugln(msg string, ctx ...interface{})

Debugln debugln

func Error

func Error(msg string, ctx ...interface{})

Error error

func Errorf

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

Errorf errorf

func Errorln

func Errorln(msg string, ctx ...interface{})

Errorln errorln

func Fatal

func Fatal(msg string, ctx ...interface{})

Fatal fatal

func Fatalf

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

Fatalf fatalf

func Fatalln

func Fatalln(msg string, ctx ...interface{})

Fatalln fatalln

func Info

func Info(msg string, ctx ...interface{})

Info info

func Infof

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

Infof infof

func Infoln

func Infoln(msg string, ctx ...interface{})

Infoln infoln

func Null

func Null(string, ...interface{})

Null don't output anything

func Panic

func Panic(msg string, ctx ...interface{})

Panic panic

func Panicf

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

Panicf panicf

func Panicln

func Panicln(msg string, ctx ...interface{})

Panicln panicln

func Print

func Print(msg ...interface{})

Print print

func Printf

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

Printf printf

func Println

func Println(msg ...interface{})

Println println

func SetLogFile

func SetLogFile(logFile string, logRotation, logMaxAge uint64)

SetLogFile set log file path and rotation

func SetLogger

func SetLogger(logLevel uint32, jsonFormat, colorFormat bool)

SetLogger set log level and format etc

func Trace

func Trace(msg string, ctx ...interface{})

Trace trace

func Tracef

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

Tracef tracef

func Traceln

func Traceln(msg string, ctx ...interface{})

Traceln traceln

func Warn

func Warn(msg string, ctx ...interface{})

Warn warn

func Warnf

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

Warnf warnf

func Warnln

func Warnln(msg string, ctx ...interface{})

Warnln warnln

func WithFields

func WithFields(ctx ...interface{}) *logrus.Entry

WithFields encapsulate logrus.WithFields

Types

type PrintFunc

type PrintFunc func(msg string, ctx ...interface{})

PrintFunc print function prototype

func GetPrintFuncOr

func GetPrintFuncOr(predicate func() bool, targetFunc, otherFunc PrintFunc) PrintFunc

GetPrintFuncOr get log func of default

Jump to

Keyboard shortcuts

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