common

package
v0.0.0-...-5ce0ef2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerInterface

type LoggerInterface interface {
	ErrorLog(ctx context.Context, err error, msg string, additional any)
	WarningLog(ctx context.Context, msg string, additional any)
	InfoLog(ctx context.Context, msg string, additional any)
	DebugLog(ctx context.Context, msg string, additional any)
	FatalLog(ctx context.Context, msg string, additional any)
}

type ZLogger

type ZLogger struct {
	// contains filtered or unexported fields
}

ZLogger is an implementation of LoggerInterface

func NewZLogger

func NewZLogger(writeToFile bool, filePath string) *ZLogger

NewZLogger creates a new instance of MyLogger with the specified output option

func (*ZLogger) DebugLog

func (l *ZLogger) DebugLog(ctx context.Context, msg string, additional interface{})

DebugLog implements the DebugLog method of LoggerInterface

func (*ZLogger) ErrorLog

func (l *ZLogger) ErrorLog(ctx context.Context, err error, msg string, additional interface{})

ErrorLog implements the ErrorLog method of LoggerInterface

func (*ZLogger) FatalLog

func (l *ZLogger) FatalLog(ctx context.Context, msg string, additional interface{})

FatalLog implements the FatalLog method of LoggerInterface

func (*ZLogger) InfoLog

func (l *ZLogger) InfoLog(ctx context.Context, msg string, additional interface{})

InfoLog implements the InfoLog method of LoggerInterface

func (*ZLogger) WarningLog

func (l *ZLogger) WarningLog(ctx context.Context, msg string, additional interface{})

WarningLog implements the WarningLog method of LoggerInterface

Jump to

Keyboard shortcuts

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