Merge pull request #19794 from calavera/14358-disable-colors

[Carry 18621] Allow disabling of colored Docker logs via daemon flag.
Upstream-commit: 85475f7deabed7d94e98321bdb190f7eb756eaec
Component: engine
This commit is contained in:
David Calavera
2016-02-01 15:37:44 -08:00
10 changed files with 83 additions and 31 deletions

View File

@ -168,7 +168,10 @@ func (cli *DaemonCli) CmdDaemon(args ...string) error {
logrus.Warn("Running experimental build")
}
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: jsonlog.RFC3339NanoFixed})
logrus.SetFormatter(&logrus.TextFormatter{
TimestampFormat: jsonlog.RFC3339NanoFixed,
DisableColors: cli.Config.RawLogs,
})
if err := setDefaultUmask(); err != nil {
logrus.Fatalf("Failed to set umask: %v", err)