func (e *Entry) WithDuration(d time.Duration) *Entry {
	return e.WithField("duration", d.Milliseconds())
}
WithDuration returns a new entry with the "duration" field set
to the given duration in milliseconds.
package log
import (
	"fmt"
	"os"
	"strings"
	"time"
)
var _ Interface = (*Entry)(nil)
var Now = time.Now
type Entry struct {
	Logger    *Logger   `json:"-"`
	Fields    Fields    `json:"fields"`
	Level     Level     `json:"level"`
	Timestamp time.Time `json:"timestamp"`
	Message   string    `json:"message"`
	start     time.Time
	fields    []Fields
}
func NewEntry(log *Logger) *Entry {
	return &Entry{
		Logger: log,
	}
}
func (e *Entry) WithFields(fields Fielder) *Entry {
	f := []Fields{}
	f = append(f, e.fields...)
	f = append(f, fields.Fields())
	return &Entry{
		Logger: e.Logger,
		fields: f,
	}
}
func (e *Entry) WithField(key string, value interface{}) *Entry {
	return e.WithFields(Fields{key: value})
}