helper

package
v0.0.1-20231017-0003 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// Logger -> you can set the logger by yourself, or you can indicate a channel name
	// and it will bind automatically with it
	Logger *model.Logger

	// ChannelName -> it's automatically binding with the config file if exists!
	ChannelName string
	// These are additional info/params
	ModuleName    string
	SubModuleName string
	FunctionName  string
	//
	VersionNr string

	// These are additional keys
	AdditionalInfo map[string]string
	// contains filtered or unexported fields
}

func New

func New(l *Logger) (*Logger, error)

func (*Logger) AddAdditionalInfo

func (l *Logger) AddAdditionalInfo(e *zerolog.Event) *zerolog.Event

func (*Logger) LD

func (l *Logger) LD() *zerolog.Event

LD -> 0

func (*Logger) LDF

func (l *Logger) LDF(functionName string) *zerolog.Event

LDF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LDebug

func (l *Logger) LDebug() *zerolog.Event

LDebug -> 0

func (*Logger) LDebugF

func (l *Logger) LDebugF(functionName string) *zerolog.Event

LDebugF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LE

func (l *Logger) LE() *zerolog.Event

LE -> 3

func (*Logger) LEF

func (l *Logger) LEF(functionName string) *zerolog.Event

LEF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LError

func (l *Logger) LError() *zerolog.Event

LError -> 3

func (*Logger) LErrorF

func (l *Logger) LErrorF(functionName string) *zerolog.Event

LErrorF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LEvent

func (l *Logger) LEvent(eventType string, eventName string, beforeMsg func(event *zerolog.Event))

func (*Logger) LEventCustom

func (l *Logger) LEventCustom(eventType string, eventName string) *zerolog.Event

func (*Logger) LEventF

func (l *Logger) LEventF(eventType string, eventName string, functionName string) *zerolog.Event

func (*Logger) LF

func (l *Logger) LF() *zerolog.Event

LF -> 4

func (*Logger) LFF

func (l *Logger) LFF(functionName string) *zerolog.Event

LFF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LFatal

func (l *Logger) LFatal() *zerolog.Event

LFatal -> 4

func (*Logger) LFatalF

func (l *Logger) LFatalF(functionName string) *zerolog.Event

LFatalF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LI

func (l *Logger) LI() *zerolog.Event

LI -> 1

func (*Logger) LIF

func (l *Logger) LIF(functionName string) *zerolog.Event

LIF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LInfo

func (l *Logger) LInfo() *zerolog.Event

LInfo -> 1

func (*Logger) LInfoF

func (l *Logger) LInfoF(functionName string) *zerolog.Event

LInfoF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LP

func (l *Logger) LP() *zerolog.Event

LP -> 5

func (*Logger) LPF

func (l *Logger) LPF(functionName string) *zerolog.Event

LPF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LPanic

func (l *Logger) LPanic() *zerolog.Event

LPanic -> 5

func (*Logger) LPanicF

func (l *Logger) LPanicF(functionName string) *zerolog.Event

LPanicF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LW

func (l *Logger) LW() *zerolog.Event

LW -> 2

func (*Logger) LWF

func (l *Logger) LWF(functionName string) *zerolog.Event

LWF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) LWarn

func (l *Logger) LWarn() *zerolog.Event

LWarn -> 2

func (*Logger) LWarnF

func (l *Logger) LWarnF(functionName string) *zerolog.Event

LWarnF -> when you need specifically to indicate in what function the logging is happening

func (*Logger) SetAddInfo

func (l *Logger) SetAddInfo(k, v string) *Logger

func (*Logger) SetFunctionName

func (l *Logger) SetFunctionName(functionName string) *Logger

func (*Logger) SetModuleName

func (l *Logger) SetModuleName(moduleName string) *Logger

func (*Logger) SetSubModuleName

func (l *Logger) SetSubModuleName(subModuleName string) *Logger

func (*Logger) SetVersionNr

func (l *Logger) SetVersionNr(versionNr string) *Logger

Jump to

Keyboard shortcuts

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