func (entry *Entry) Traceln(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(TraceLevel) {
		entry.Trace(entry.sprintlnn(args...))
	}
}
Entry Println family functions
package logrus
import (
	"bytes"
	"fmt"
	"os"
	"reflect"
	"runtime"
	"strings"
	"sync"
	"time"
)
var (
	bufferPool *sync.Pool
	logrusPackage string
	minimumCallerDepth int
	callerInitOnce sync.Once
)
const (
	maximumCallerDepth int = 25
	knownLogrusFrames  int = 4
)
func init() {
	bufferPool = &sync.Pool{
		New: func() interface{} {
			return new(bytes.Buffer)
		},
	}
	minimumCallerDepth = 1
}
var ErrorKey = "error"
type Entry struct {
	Logger *Logger
	Data Fields
	Time time.Time
	Level Level
	Caller *runtime.Frame
	Message string
	Buffer *bytes.Buffer
	err string
}
func NewEntry(logger *Logger) *Entry {
	return &Entry{
		Logger: logger,
		Data: make(Fields, 6),
	}
}
func (entry *Entry) String() (string, error) {
	serialized, err := entry.Logger.Formatter.Format(entry)
	if err != nil {
		return "", err
	}
	str := string(serialized)
	return str, nil
}
func (entry *Entry) WithError(err error) *Entry {
	return entry.WithField(ErrorKey, err)
}
func (entry *Entry) WithField(key string, value interface{}) *Entry {
	return entry.WithFields(Fields{key: value})
}
func (entry *Entry) WithFields(fields Fields) *Entry {
	data := make(Fields, len(entry.Data)+len(fields))
	for k, v := range entry.Data {
		data[k] = v
	}
	var field_err string
	for k, v := range fields {
		if t := reflect.TypeOf(v); t != nil && t.Kind() == reflect.Func {
			field_err = fmt.Sprintf("can not add field %q", k)
			if entry.err != "" {
				field_err = entry.err + ", " + field_err
			}
		} else {
			data[k] = v
		}
	}
	return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: field_err}
}
func (entry *Entry) WithTime(t time.Time) *Entry {
	return &Entry{Logger: entry.Logger, Data: entry.Data, Time: t}
}
func getPackageName(f string) string {
	for {
		lastPeriod := strings.LastIndex(f, ".")
		lastSlash := strings.LastIndex(f, "/")
		if lastPeriod > lastSlash {
			f = f[:lastPeriod]
		} else {
			break
		}
	}
	return f
}
func getCaller() *runtime.Frame {
	pcs := make([]uintptr, maximumCallerDepth)
	depth := runtime.Callers(minimumCallerDepth, pcs)
	frames := runtime.CallersFrames(pcs[:depth])
	callerInitOnce.Do(func() {
		logrusPackage = getPackageName(runtime.FuncForPC(pcs[0]).Name())
		minimumCallerDepth = knownLogrusFrames
	})
	for f, again := frames.Next(); again; f, again = frames.Next() {
		pkg := getPackageName(f.Function)
		if pkg != logrusPackage {
			return &f
		}
	}
	return nil
}
func (entry Entry) HasCaller() (has bool) {
	return entry.Logger != nil &&
		entry.Logger.ReportCaller &&
		entry.Caller != nil
}
func (entry Entry) log(level Level, msg string) {
	var buffer *bytes.Buffer
	if entry.Time.IsZero() {
		entry.Time = time.Now()
	}
	entry.Level = level
	entry.Message = msg
	if entry.Logger.ReportCaller {
		entry.Caller = getCaller()
	}
	entry.fireHooks()
	buffer = bufferPool.Get().(*bytes.Buffer)
	buffer.Reset()
	defer bufferPool.Put(buffer)
	entry.Buffer = buffer
	entry.write()
	entry.Buffer = nil
	if level <= PanicLevel {
		panic(&entry)
	}
}
func (entry *Entry) fireHooks() {
	entry.Logger.mu.Lock()
	defer entry.Logger.mu.Unlock()
	err := entry.Logger.Hooks.Fire(entry.Level, entry)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
	}
}
func (entry *Entry) write() {
	entry.Logger.mu.Lock()
	defer entry.Logger.mu.Unlock()
	serialized, err := entry.Logger.Formatter.Format(entry)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
	} else {
		_, err = entry.Logger.Out.Write(serialized)
		if err != nil {
			fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
		}
	}
}
func (entry *Entry) Trace(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(TraceLevel) {
		entry.log(TraceLevel, fmt.Sprint(args...))
	}
}
func (entry *Entry) Debug(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(DebugLevel) {
		entry.log(DebugLevel, fmt.Sprint(args...))
	}
}
func (entry *Entry) Print(args ...interface{}) {
	entry.Info(args...)
}
func (entry *Entry) Info(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(InfoLevel) {
		entry.log(InfoLevel, fmt.Sprint(args...))
	}
}
func (entry *Entry) Warn(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(WarnLevel) {
		entry.log(WarnLevel, fmt.Sprint(args...))
	}
}
func (entry *Entry) Warning(args ...interface{}) {
	entry.Warn(args...)
}
func (entry *Entry) Error(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(ErrorLevel) {
		entry.log(ErrorLevel, fmt.Sprint(args...))
	}
}
func (entry *Entry) Fatal(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(FatalLevel) {
		entry.log(FatalLevel, fmt.Sprint(args...))
	}
	entry.Logger.Exit(1)
}
func (entry *Entry) Panic(args ...interface{}) {
	if entry.Logger.IsLevelEnabled(PanicLevel) {
		entry.log(PanicLevel, fmt.Sprint(args...))
	}
	panic(fmt.Sprint(args...))
}
func (entry *Entry) Tracef(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(TraceLevel) {
		entry.Trace(fmt.Sprintf(format, args...))
	}
}
func (entry *Entry) Debugf(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(DebugLevel) {
		entry.Debug(fmt.Sprintf(format, args...))
	}
}
func (entry *Entry) Infof(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(InfoLevel) {
		entry.Info(fmt.Sprintf(format, args...))
	}
}
func (entry *Entry) Printf(format string, args ...interface{}) {
	entry.Infof(format, args...)
}
func (entry *Entry) Warnf(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(WarnLevel) {
		entry.Warn(fmt.Sprintf(format, args...))
	}
}
func (entry *Entry) Warningf(format string, args ...interface{}) {
	entry.Warnf(format, args...)
}
func (entry *Entry) Errorf(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(ErrorLevel) {
		entry.Error(fmt.Sprintf(format, args...))
	}
}
func (entry *Entry) Fatalf(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(FatalLevel) {
		entry.Fatal(fmt.Sprintf(format, args...))
	}
	entry.Logger.Exit(1)
}
func (entry *Entry) Panicf(format string, args ...interface{}) {
	if entry.Logger.IsLevelEnabled(PanicLevel) {
		entry.Panic(fmt.Sprintf(format, args...))
	}
}