func (logger *Logger) WithError(err error) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithError(err)
}
Add an error as single field to the log entry.  All it does is call
`WithError` for the given `error`.
package logrus
import (
	"io"
	"os"
	"sync"
)
type Logger struct {
	Out io.Writer
	Hooks LevelHooks
	Formatter Formatter
	Level Level
	mu MutexWrap
	entryPool sync.Pool
}
type MutexWrap struct {
	lock     sync.Mutex
	disabled bool
}
func (mw *MutexWrap) Lock() {
	if !mw.disabled {
		mw.lock.Lock()
	}
}
func (mw *MutexWrap) Unlock() {
	if !mw.disabled {
		mw.lock.Unlock()
	}
}
func (mw *MutexWrap) Disable() {
	mw.disabled = true
}
func New() *Logger {
	return &Logger{
		Out:       os.Stderr,
		Formatter: new(TextFormatter),
		Hooks:     make(LevelHooks),
		Level:     InfoLevel,
	}
}
func (logger *Logger) newEntry() *Entry {
	entry, ok := logger.entryPool.Get().(*Entry)
	if ok {
		return entry
	}
	return NewEntry(logger)
}
func (logger *Logger) releaseEntry(entry *Entry) {
	logger.entryPool.Put(entry)
}
func (logger *Logger) WithField(key string, value interface{}) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithField(key, value)
}
func (logger *Logger) WithFields(fields Fields) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithFields(fields)
}