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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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