Merge pull request #263 from Random-Liu/fix-log

Fix one line of log, we are writing not reading.
This commit is contained in:
Lantao Liu 2017-09-19 13:24:28 -07:00 committed by GitHub
commit 3647ff5976

View File

@ -52,7 +52,7 @@ func NewDiscardLogger() io.WriteCloser {
// NewCRILogger returns a write closer which redirect container log into // NewCRILogger returns a write closer which redirect container log into
// log file, and decorate the log line into CRI defined format. // log file, and decorate the log line into CRI defined format.
func NewCRILogger(path string, stream StreamType) (io.WriteCloser, error) { func NewCRILogger(path string, stream StreamType) (io.WriteCloser, error) {
glog.V(4).Infof("Start reading log file %q", path) glog.V(4).Infof("Start writing log file %q", path)
prc, pwc := io.Pipe() prc, pwc := io.Pipe()
f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0640) f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0640)
if err != nil { if err != nil {