func New(format string) (*ApacheLog, error) {
	var f Format
	if err := f.compile(format); err != nil {
		return nil, errors.Wrap(err, "failed to compile log format")
	}
	return &ApacheLog{format: &f}, nil
}
New creates a new ApacheLog instance from the given
format. It will return an error if the format fails to compile.
package apachelog
import (
	"io"
	"net/http"
	"os"
	"time"
	"github.com/pkg/errors"
)