logging

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logging is a package to initialise and inject a zap logger into the web issuer. Everything here is pretty tightly coupled to the web issuer, so it'll be hard to reuse.

Index

Constants

View Source
const (
	ComponentField    = "component"
	SubComponentField = "subcomponent"
)

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx *gin.Context) *zap.Logger

Fetch fetches a new logger from the gin context, or if not found, initialises a new one and adds itself to the context and returns that.

func Injector

func Injector(logger *zap.Logger) gin.HandlerFunc

Injector injects the logger in the gin context, to be used as middleware.

func New

func New() *zap.Logger

New creates a new logger based on the gin mode. Note, this panics if the logger can't be initialised.

Types

This section is empty.

Jump to

Keyboard shortcuts

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