log

package
v0.0.0-...-70044d4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogConnection *logrus.Logger
View Source
var LogHttpLog *logrus.Logger
View Source
var LogStackTrace *logrus.Logger
View Source
var LogStd *logrus.Logger
View Source
var LogVerbose *logrus.Logger
View Source
var ProjectName string

Functions

func C

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

func D

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

func Debugf

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

func Default

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

func E

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

func EW

func EW(format string, err error)

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func FormatWithWrapper

func FormatWithWrapper(entry *logrus.Entry) ([]byte, error)

func Get

func Get() *logrus.Logger

func GetProjectName

func GetProjectName() string

func GetRef

func GetRef() **logrus.Logger

func HC

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

func I

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

func Infof

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

func InitLogByProjectName

func InitLogByProjectName(
	logger **logrus.Logger,
	projectName string,
	projectPath string,
	loggerSubName string,
	printConsole bool)

func InitLogCfg

func InitLogCfg(
	logger **logrus.Logger,
	initCfg *LogInitConfiguration)

func JavaJsonFormatWithWrapper

func JavaJsonFormatWithWrapper(entry *logrus.Entry) ([]byte, error)

func Print

func Print(format string, args ...interface{}) (err error)

func PrintJavaJsonWithEntry

func PrintJavaJsonWithEntry(entry *logrus.Entry) ([]byte, error)

func PrintWithEntry

func PrintWithEntry(entry *logrus.Entry) ([]byte, error)

func Printf

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

func Println

func Println(args ...interface{})

func SettingProjectName

func SettingProjectName(projectName string)

func T

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

func V

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

func W

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

func Warnf

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

Types

type JavaJsonFormatter

type JavaJsonFormatter struct {
	Prefix string
	Suffix string
}

func (*JavaJsonFormatter) Format

func (jjf *JavaJsonFormatter) Format(entry *logrus.Entry) ([]byte, error)

type LogInitConfiguration

type LogInitConfiguration struct {
	ProjectName   string
	ProjectPath   string
	PrintLevel    string
	LoggerSubName string
	PrintConsole  bool
	LogKeepHour   int
}

type PlainFormatter

type PlainFormatter struct {
	Prefix string
	Suffix string
}

func (*PlainFormatter) Format

func (mf *PlainFormatter) Format(entry *logrus.Entry) ([]byte, error)

type SqlLogger

type SqlLogger struct {
	Log *logrus.Logger
	// contains filtered or unexported fields
}

func (SqlLogger) Debug

func (s SqlLogger) Debug(v ...interface{})

func (SqlLogger) Debugf

func (s SqlLogger) Debugf(format string, v ...interface{})

func (SqlLogger) Error

func (s SqlLogger) Error(v ...interface{})

func (SqlLogger) Errorf

func (s SqlLogger) Errorf(format string, v ...interface{})

func (SqlLogger) Info

func (s SqlLogger) Info(v ...interface{})

func (SqlLogger) Infof

func (s SqlLogger) Infof(format string, v ...interface{})

func (SqlLogger) IsShowSQL

func (s SqlLogger) IsShowSQL() bool

func (SqlLogger) Level

func (s SqlLogger) Level() core.LogLevel

func (SqlLogger) SetLevel

func (s SqlLogger) SetLevel(l core.LogLevel)

func (SqlLogger) ShowSQL

func (s SqlLogger) ShowSQL(show ...bool)

func (SqlLogger) Warn

func (s SqlLogger) Warn(v ...interface{})

func (SqlLogger) Warnf

func (s SqlLogger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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