logger

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ZapConfig zap.Config        `json:"zap_config" yaml:"zap_config"`
	LogRotate lumberjack.Logger `json:"log_rotate" yaml:"log_rotate"`
}

Config represents the setting for zap logger.

type Logger

type Logger struct {
	Zap *zap.SugaredLogger
}

Logger is an alternative implementation of *gorm.Logger

func NewLogger

func NewLogger(env string) *Logger

NewLogger create logger object for *gorm.DB from *echo.Logger

func (*Logger) GetZapLogger

func (log *Logger) GetZapLogger() *zap.SugaredLogger

GetZapLogger returns zapSugaredLogger

func (*Logger) Print

func (l *Logger) Print(values ...interface{})

Print passes arguments to Println

func (*Logger) Println

func (l *Logger) Println(values []interface{})

Println format & print log

Jump to

Keyboard shortcuts

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