engine

package
v0.0.0-...-ddc6517 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package engine implements the factory function of *gin.Engine writing logs using zap.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultWriter io.Writer
	DefaultLevel  zapcore.Level = zapcore.DebugLevel
	DefaultMsg    string        = "GIN"
	DefaultKey    string        = "L"

	DefaultErrorWriter io.Writer
	DefaultErrorLevel  zapcore.Level = zapcore.ErrorLevel
	DefaultErrorMsg    string        = "GIN"
	DefaultErrorKey    string        = "L"
)

Functions

func New

func New() *gin.Engine

New returns the *gin.Engine writing logs using zap.

func SetDefaultMode

func SetDefaultMode(defaultMode string)

SetDefaultMode changes the mode of gin to defaultMode if the environment variable GIN_MODE (a.k.a gin.EnvGinMode) is not set, otherwise set to GIN_MODE.

Types

This section is empty.

Jump to

Keyboard shortcuts

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