Add support for configuration static logging fields
To allow flexibility in log message context information, this changeset provides the ability to configure static fields that are included in the context. Such fields can be set via configuration or environment variables. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
a75f0f26f7
commit
ac73963d7e
5 changed files with 89 additions and 12 deletions
|
@ -25,6 +25,10 @@ type Configuration struct {
|
|||
// Formatter overrides the default formatter with another. Options
|
||||
// include "text", "json" and "logstash".
|
||||
Formatter string `yaml:"formatter"`
|
||||
|
||||
// Fields allows users to specify static string fields to include in
|
||||
// the logger context.
|
||||
Fields map[string]string `yaml:"fields"`
|
||||
}
|
||||
|
||||
// Loglevel is the level at which registry operations are logged. This is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue