Merge pull request #3934 from stonezdj/add_caller_info
Add option to enable caller information in logger
This commit is contained in:
commit
6a57630cf4
3 changed files with 9 additions and 4 deletions
|
@ -23,10 +23,11 @@ var configStruct = Configuration{
|
|||
AccessLog struct {
|
||||
Disabled bool `yaml:"disabled,omitempty"`
|
||||
} `yaml:"accesslog,omitempty"`
|
||||
Level Loglevel `yaml:"level,omitempty"`
|
||||
Formatter string `yaml:"formatter,omitempty"`
|
||||
Fields map[string]interface{} `yaml:"fields,omitempty"`
|
||||
Hooks []LogHook `yaml:"hooks,omitempty"`
|
||||
Level Loglevel `yaml:"level,omitempty"`
|
||||
Formatter string `yaml:"formatter,omitempty"`
|
||||
Fields map[string]interface{} `yaml:"fields,omitempty"`
|
||||
Hooks []LogHook `yaml:"hooks,omitempty"`
|
||||
ReportCaller bool `yaml:"reportcaller,omitempty"`
|
||||
}{
|
||||
Level: "info",
|
||||
Fields: map[string]interface{}{"environment": "test"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue