// LogWriter returns an Exporter that logs events to the supplied writer. // If onlyErrors is true it does not log any event that did not have an // associated error. // It ignores all telemetry other than log events. func LogWriter(w io.Writer, onlyErrors bool) event.Exporter { … } type logWriter … func (w *logWriter) ProcessEvent(ctx context.Context, ev core.Event, lm label.Map) context.Context { … }