func WithDateFormatter(v DateFormatFunc) Option {
	return func(c *config) {
		c.formatDate = v
	}
}
WithDateFormatter overrides the default date formatter.
package logformat
import (
	"fmt"
	"sort"
	"strconv"
	"strings"
	"time"
	"github.com/nqd/flat"
	"github.com/tj/go-logformat/internal/colors"
)
type FormatFunc func(string) string
type DateFormatFunc func(time.Time) string
type Formatters map[string]FormatFunc
var DefaultFormatters = Formatters{
	"debug":     colors.Gray,
	"info":      colors.Purple,
	"warn":      colors.Yellow,
	"warning":   colors.Yellow,
	"error":     colors.Red,
	"fatal":     colors.Red,
	"critical":  colors.Red,
	"emergency": colors.Red,
	"string": colors.None,
	"number": colors.None,
	"bool":   colors.None,
	"date":   colors.Gray,
	"object.key":       colors.Purple,
	"object.separator": colors.Gray,
	"object.value":     colors.None,
	"array.delimiter": colors.Gray,
	"array.separator": colors.Gray,
	"message": colors.None,
	"program": colors.Gray,
	"stage":   colors.Gray,
	"version": colors.Gray,
}
var NoColor = Formatters{
	"debug":     colors.None,
	"info":      colors.None,
	"warn":      colors.None,
	"warning":   colors.None,
	"error":     colors.None,
	"fatal":     colors.None,
	"critical":  colors.None,
	"emergency": colors.None,
	"string": colors.None,
	"number": colors.None,
	"bool":   colors.None,
	"date":   colors.None,
	"object.key":       colors.None,
	"object.separator": colors.None,
	"object.value":     colors.None,
	"array.delimiter": colors.None,
	"array.separator": colors.None,
	"message": colors.None,
	"program": colors.None,
	"stage":   colors.None,
	"version": colors.None,
}
type config struct {
	format     Formatters
	formatDate DateFormatFunc
	flatten    bool
	prefix     string
}
type Option func(*config)
func WithPrefix(s string) Option {
	return func(c *config) {
		c.prefix = s
	}
}
func WithFormatters(v Formatters) Option {
	return func(c *config) {
		c.format = v
	}
}