func (rec *LogRec) Logger() Logger {
	return rec.logger
}
Logger returns the `Logger` that created this `LogRec`.
package logr
import (
	"fmt"
	"path/filepath"
	"runtime"
	"strings"
	"sync"
	"time"
)
type LogRec struct {
	mux  sync.RWMutex
	time time.Time
	level  Level
	logger Logger
	msg     string
	newline bool
	fields  []Field
	stackPC    []uintptr
	stackCount int
	flush chan struct{}
	frames    []runtime.Frame
	fieldsAll []Field
	caller    string
}
func NewLogRec(lvl Level, logger Logger, msg string, fields []Field, incStacktrace bool) *LogRec {
	rec := &LogRec{time: time.Now(), logger: logger, level: lvl, msg: msg, fields: fields}
	if incStacktrace {
		rec.stackPC = make([]uintptr, DefaultMaxStackFrames)
		rec.stackCount = runtime.Callers(2, rec.stackPC)
	}
	return rec
}
func newFlushLogRec(logger Logger) *LogRec {
	return &LogRec{logger: logger, flush: make(chan struct{})}
}
func (rec *LogRec) prep() {
	rec.mux.Lock()
	defer rec.mux.Unlock()
	rec.fieldsAll = make([]Field, 0, len(rec.fields)+len(rec.logger.fields))
	rec.fieldsAll = append(rec.fieldsAll, rec.logger.fields...)
	rec.fieldsAll = append(rec.fieldsAll, rec.fields...)
	filter := rec.logger.lgr.options.stackFilter
	if rec.stackCount > 0 {
		rec.frames = make([]runtime.Frame, 0, rec.stackCount)
		frames := runtime.CallersFrames(rec.stackPC[:rec.stackCount])
		for {
			frame, more := frames.Next()
			pkg := ResolvePackageName(frame.Function)
			if _, ok := filter[pkg]; !ok && pkg != "" {
				rec.frames = append(rec.frames, frame)
			}
			if !more {
				break
			}
		}
	}
	if len(rec.frames) > 0 {
		rec.caller = calcCaller(rec.frames)
	}
}
func (rec *LogRec) WithTime(time time.Time) *LogRec {
	rec.mux.RLock()
	defer rec.mux.RUnlock()
	return &LogRec{
		time:       time,
		level:      rec.level,
		logger:     rec.logger,
		msg:        rec.msg,
		newline:    rec.newline,
		fields:     rec.fields,
		stackPC:    rec.stackPC,
		stackCount: rec.stackCount,
		frames:     rec.frames,
	}
}