// WithLogOutput allows one to pass a Writer which will in turn be passed to
// memberlist for use in logging.
761852
func WithLogOutput(o io.Writer) memberSetOption {
	return func(g *memberSet) error {
		g.logOutput = o
		return nil
	}
}
1147974
func (c *Websocket) WithWriteTimeout(timeout time.Duration) *Websocket {
	c.writeTimeout = timeout
	return c
}
589561
func (l *Logger) SetOutput(w io.Writer) {
	l.mu.Lock()
	defer l.mu.Unlock()
	l.lg.SetOutput(w)
}
716381
func (logger *Logger) SetOutput(out io.Writer) {
	unsafeStd := (*unsafe.Pointer)(unsafe.Pointer(&logger.std))
	old := logger.std
	logger.std.Out = out
	atomic.CompareAndSwapPointer(unsafeStd, unsafe.Pointer(old), unsafe.Pointer(logger.std))

}
244660
func withLogger(logger log.Logger) func(c *zk.Conn) {
	return func(c *zk.Conn) {
		c.SetLogger(wrapLogger{logger})
	}
}
1005120
func (r *Runner) captureOutput(blocker chan struct{}) {
	var lines string

	defer r.pipeReader.Close()

	scanner := bufio.NewScanner(r.pipeReader)
	for scanner.Scan() {
		lines += scanner.Text()
	}

	r.captureBuffer = lines
	blocker <- struct{}{}
}
691372
func NewSyslogOutput(network, address, tag string) Output {
	return NewSyslogOutputFacility(network, address, tag, syslog.LOG_USER)
}
517461
func (w *Writer) WriteWith(fw recordio.Writer, b *logpb.ButlerLogBundle) error {
	data, err := proto.Marshal(b)
	if err != nil {
		entries := b.GetEntries()
		// TODO(tandrii, hinoka): leave just error after crbug.com/859995 is fixed.
		if len(entries) > 100 {
			return fmt.Errorf("butlerproto: failed to marshal Bundle of len %d with first 100 entries %s: %s",
				len(entries), entries[:100], err)
		} else {
			return fmt.Errorf("butlerproto: failed to marshal Bundle %s: %s", entries, err)
		}
	}

	return w.writeData(fw, logpb.ButlerMetadata_ButlerLogBundle, data)
}
876914
func logOutputFunction(data unsafe.Pointer, category C.int, pri C.SDL_LogPriority, message *C.char) {
	ctx := (*logOutputFunctionCtx)(data)

	ctx.f(ctx.d, int(category), LogPriority(pri), C.GoString(message))
}
1200335
func newLogOutputView(awsSession *session.Session,
	app *tview.Application,
	lambdaAWSInfos []*LambdaAWSInfo,
	settings map[string]string,
	logger *logrus.Logger) (tview.Primitive, []tview.Primitive) {

	// Log to JSON
	logger.Formatter = &colorizingFormatter{}
	logDataView := tview.NewTextView().
		SetScrollable(true).
		SetDynamicColors(true)
	logDataView.SetChangedFunc(func() {
		logDataView.ScrollToEnd()
	})
	logDataView.SetBorder(true).SetTitle("Output")

	colorWriter := tview.ANSIWriter(logDataView)
	logger.Out = colorWriter
	return logDataView, []tview.Primitive{logDataView}
}
418322
func (c *Console) consoleOutput(call otto.FunctionCall) otto.Value {
	var output []string
	for _, argument := range call.ArgumentList {
		output = append(output, fmt.Sprintf("%v", argument))
	}
	fmt.Fprintln(c.printer, strings.Join(output, " "))
	return otto.Value{}
}
1105770
func (l Logger) Output(w io.Writer) Logger {
	l2 := New(w)
	l2.level = l.level
	l2.sampler = l.sampler
	if len(l.hooks) > 0 {
		l2.hooks = append(l2.hooks, l.hooks...)
	}
	if l.context != nil {
		l2.context = make([]byte, len(l.context), cap(l.context))
		copy(l2.context, l.context)
	}
	return l2
}
608203
func (fo *FileWriterOutput) Output(ll LogLevel, message []byte) {
	if fo.WriterOutput == nil {
		fh, err := fo.openFile()
		if err != nil {
			fo.fallbackLog("Could not open %#v: %s", fo.path, err)
			return
		}
		fo.WriterOutput = NewWriterOutput(fh)
	}
	fo.WriterOutput.Output(ll, message)
}
1120738
func (c *Cmd) CombinedOutput(scopedLog *logrus.Entry, verbose bool) ([]byte, error) {
	out, err := combinedOutput(c.ctx, c.Cmd, c.filters, scopedLog, verbose)
	if c.cancelFn != nil {
		c.cancelFn()
	}
	return out, err
}
1147041
func SetOutput(out io.Writer) {
	std = New(out, std.Prefix(), std.Flags(), std.priority)
}
761013
func WithLogger(ctx context.Context, logger Logger) context.Context {
	return context.WithValue(ctx, loggerKey{}, logger)
}
273731
func SetOutput(level int, w io.Writer, prefix string, flag int) error {
	return defaultLogs.SetOutput(level, w, prefix, flag)
}