func Logger(l *log.Logger) Option {
	return func(t *Tracer) error {
		t.log = l
		return nil
	}
}
Logger defines the logger the tracer will use.

It defaults to logrus.StandardLogger(), the global logger used by logrus.
package trace
import (
	"crypto/tls"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"strconv"
	"time"
	log "github.com/sirupsen/logrus"
	"github.com/vulcand/oxy/utils"
)
type Option func(*Tracer) error
func ErrorHandler(h utils.ErrorHandler) Option {
	return func(t *Tracer) error {
		t.errHandler = h
		return nil
	}
}
func RequestHeaders(headers ...string) Option {
	return func(t *Tracer) error {
		t.reqHeaders = append(t.reqHeaders, headers...)
		return nil
	}
}
func ResponseHeaders(headers ...string) Option {
	return func(t *Tracer) error {
		t.respHeaders = append(t.respHeaders, headers...)
		return nil
	}
}
type Tracer struct {
	errHandler  utils.ErrorHandler
	next        http.Handler
	reqHeaders  []string
	respHeaders []string
	writer      io.Writer
	log *log.Logger
}
func New(next http.Handler, writer io.Writer, opts ...Option) (*Tracer, error) {
	t := &Tracer{
		writer: writer,
		next:   next,
		log: log.StandardLogger(),
	}
	for _, o := range opts {
		if err := o(t); err != nil {
			return nil, err
		}
	}
	if t.errHandler == nil {
		t.errHandler = utils.DefaultHandler
	}
	return t, nil
}