Skip to content

core-go/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log

  • wrapper of zap
  • wrapper of logrus
  • middleware tracing log

Installation

Please make sure to initialize a Go module before installing core-go/log:

go get -u github.com/core-go/log

Import:

import "github.com/core-go/log"

middleware log tracing

middleware log for

  • http
  • echo
  • gin

Features

log tracing at middleware

Support to turn on, turn off
  • request
  • response
  • duration
  • http response status code
  • response content length
Support to mask or encrypt fields
  • support to mask or encrypt fields, such as mobileNumber, creditCardNumber

Microservice Architect

Microservice Architect

A typical micro service

  • When you zoom one micro service, the flow is as below, and you can see "middleware" in the full picture: A typical micro service

Cross-cutting concerns

  • "middleware" in the full picture of cross-cutting concerns cross-cutting concerns