1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-04 21:42:57 +02:00

fix: struct field alignment (#2632)

This commit is contained in:
Lukasz Raczylo
2023-04-26 00:16:34 +00:00
committed by GitHub
parent 0f9b2f00c9
commit a7522e7d6c
113 changed files with 694 additions and 637 deletions

View File

@ -23,8 +23,8 @@ func init() {
}
type defaultLogger struct {
sync.RWMutex
opts Options
sync.RWMutex
}
// Init (opts...) should only overwrite provided options.

View File

@ -8,16 +8,16 @@ import (
type Option func(*Options)
type Options struct {
// The logging level the logger should log at. default is `InfoLevel`
Level Level
// fields to always be logged
Fields map[string]interface{}
// It's common to set this to a file, or leave it default which is `os.Stderr`
Out io.Writer
// Caller skip frame count for file:line info
CallerSkipCount int
// Alternative options
Context context.Context
// fields to always be logged
Fields map[string]interface{}
// Caller skip frame count for file:line info
CallerSkipCount int
// The logging level the logger should log at. default is `InfoLevel`
Level Level
}
// WithFields set default fields for the logger.