Skip to content

gozix/zap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoZix Zap

License Documentation

Release Build Status Go Report Card Code Coverage

The bundle provide a Zap integration to GoZix application.

Installation

go get github.com/gozix/zap/v3

Dependencies

Configuration example

time_encoder config can be ("iso8601", "millis", "nanos") and only for "console" and "json" encoding

{
  "zap": {
    "cores": {
      "console": {
        "type": "stream",
        "level": "debug",
        "encoding": "console",
        "message_key": "message",
        "time_encoder": "iso8601"
      },
      "json": {
        "type": "stream",
        "level": "debug",
        "encoding": "json",
        "message_key": "message",
        "time_encoder": "millis"
      }
    },
    "caller": true,
    "fields": [{
      "key": "team",
      "value": "any team name"
    }, {
      "key": "service",
      "value": "any service name"
    }],
    "stacktrace": "error",
    "development": true
  }
}

Built-in DI options

Name Description
AsCoreFactory Add an factory

Cores

Documentation

You can find documentation on pkg.go.dev and read source code if needed.

Questions

If you have any questions, feel free to create an issue.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published