/* For infoStream output */
961993
func (w *IndexWriter) toLiveInfos(sis *SegmentInfos) *SegmentInfos {
	w.Lock() // synchronized
	defer w.Unlock()
	return w._toLiveInfos(sis)
}
957541
func (logger *Logger) Infof(format string, args ...interface{}) {
	logger.log(INFO, fmt.Sprintf(format, args...))
}
798481
func (m *MemLogger) Infof(format string, args ...interface{}) {
	m.LogCall(logging.Info, 1, format, args)
}
531956
func Infof(c context.Context, fmt string, args ...interface{}) {
	Get(c).LogCall(Info, 1, fmt, args)
}
942441
func (l *Logger) Infom(message string, v Map) {
	l.Emit(0, message, v)
}
86036
func (p *PackageLogger) Infof(format string, args ...interface{}) {
	p.Logf(INFO, format, args...)
}
44035
func (l logger) Infof(format string, args ...interface{}) {
	l.entry.Infof(format, args...)
}
1094390
func (l logger) Infof(format string, args ...interface{}) {
	l.sourced().Infof(format, args...)
}
78950
func (l *Logger) InfoDepth(depth int, v ...interface{}) {
	l.output(sInfo, depth, fmt.Sprint(v...))
}
546955
func (g *GRPCLogger) Infof(format string, args ...interface{}) {
	g.Info(fmt.Sprintf(format, args...))
}
657033
func (l *logger) Infof(format string, v ...interface{}) {
	f := extractFields(&v)
	l.send(LevelInfo, 2, fmt.Sprintf(format, v...), f)
}
1171923
func (l *jaegerLogger) Infof(msg string, args ...interface{}) {
	l.logger.Debugf(msg, args...)
}
166503
func (r *Rule) OutputFor(msg map[string]interface{}) map[string]interface{} {
	lookup := func(field string) (interface{}, bool) {
		return lookupField(field, msg)
	}
	subbed := substituteFields(r.Output, lookup)
	subbed["rule"] = r.Name
	return subbed
}
1067474
func Output(tempdir string) string {
	p := path.Join(tempdir, ".out")
	b, err := ioutil.ReadFile(p)
	if err != nil {
		return ""
	}
	return string(b)
}
1312160
func Infoln(v ...interface{}) {
	std.Fprint(std.flags, LEVEL_INFO, 2, fmt.Sprintln(v...), nil)
}
1146993
func streamOutput(src io.Reader, dst *bytes.Buffer, out io.Writer) error {
	mw := io.MultiWriter(dst, out)
	s := bufio.NewReader(src)
	for {
		var line []byte
		line, err := s.ReadSlice('\n')
		if err == io.EOF && len(line) == 0 {
			break // done
		}
		if err == io.EOF {
			return fmt.Errorf("Improper termination: %v", line)
		}
		if err != nil {
			return err
		}

		// append to the buffer and out at once
		mw.Write(line)
	}

	return nil
}
433339
func writeOutputStream(output []string, outputFile string) error {
	var f *os.File

	if outputFile == "" {
		f = os.Stdout
	} else {
		var err error
		f, err = os.Create(outputFile)
		if err != nil {
			return err
		}
		defer f.Close()
	}

	for _, doc := range output {
		_, err := f.WriteString("---\n")
		if err != nil {
			return err
		}
		_, err = f.WriteString(doc)
		if err != nil {
			return err
		}
	}

	if len(output) > 0 {
		_, err := f.WriteString("...\n")
		if err != nil {
			return err
		}
	}

	return nil
}