Browse code

add env and labels to log context

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>

Daniel Dao authored on 2015/08/11 20:27:19
Showing 2 changed files
... ...
@@ -721,6 +721,8 @@ func (container *Container) getLogger() (logger.Logger, error) {
721 721
 		ContainerImageID:    container.ImageID,
722 722
 		ContainerImageName:  container.Config.Image,
723 723
 		ContainerCreated:    container.Created,
724
+		ContainerEnv:        container.Config.Env,
725
+		ContainerLabels:     container.Config.Labels,
724 726
 	}
725 727
 
726 728
 	// Set logging file for "json-logger"
... ...
@@ -17,6 +17,8 @@ type Context struct {
17 17
 	ContainerImageID    string
18 18
 	ContainerImageName  string
19 19
 	ContainerCreated    time.Time
20
+	ContainerEnv        []string
21
+	ContainerLabels     map[string]string
20 22
 	LogPath             string
21 23
 }
22 24