model

package
v0.0.1-20230418-0001 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// This is where the entire config lies...
	Config config.Config

	// Usually we would like to create logs to: StdOut, In some file, or event output elsewhere!
	// Logrus has only 1 output,  so we decided to create multiple of them!
	// We should create a default channel with stdout
	// And additional if the user wants to other different outputs
	Logger *zerolog.Logger

	// Main Writer
	MainWriter io.Writer
}

func (*Logger) Debug

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

Debug -> 0

func (*Logger) DebugF

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

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

func (*Logger) Error

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

Error -> 3

func (*Logger) ErrorF

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

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

func (*Logger) Fatal

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

Fatal -> 4

func (*Logger) FatalF

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

func (*Logger) GetLogger

func (l *Logger) GetLogger() *zerolog.Logger

func (*Logger) Info

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

Info -> 1

func (*Logger) InfoEvent

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

InfoEvent -> when executing some events

func (*Logger) InfoEventCustom

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

InfoEventCustom -> when executing some events

func (*Logger) InfoEventF

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

InfoEventF -> with function name

func (*Logger) InfoF

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

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

func (*Logger) Panic

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

Panic -> 5

func (*Logger) PanicF

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

func (*Logger) Warn

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

Warn -> 2

func (*Logger) WarnF

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

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

Jump to

Keyboard shortcuts

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