func (logger *Logger) rtime(r *record) interface{} {
	return r.time.Sub(logger.startTime).Nanoseconds()
}
Nanoseconds since logger created
package logging
import (
	"github.com/kardianos/osext"
	"os"
	"path"
	"runtime"
	"strings"
	"sync/atomic"
	"time"
)
type record struct {
	level    Level
	seqid    uint64
	pathname string
	filename string
	module   string
	lineno   int
	funcname string
	thread   int
	process  int
	message  string
	time     time.Time
}
var fields = map[string]func(*Logger, *record) interface{}{
	"name":      (*Logger).lname,      
	"seqid":     (*Logger).nextSeqid,  
	"levelno":   (*Logger).levelno,    
	"levelname": (*Logger).levelname,  
	"created":   (*Logger).created,    
	"nsecs":     (*Logger).nsecs,      
	"time":      (*Logger).time,       
	"timestamp": (*Logger).timestamp,  
	"rtime":     (*Logger).rtime,      
	"filename":  (*Logger).filename,   
	"pathname":  (*Logger).pathname,   
	"module":    (*Logger).module,     
	"lineno":    (*Logger).lineno,     
	"funcname":  (*Logger).funcname,   
	"process":   (*Logger).process,    
	"message":   (*Logger).message,    
}
var runtimeFields = map[string]bool{
	"name":      false,
	"seqid":     false,
	"levelno":   false,
	"levelname": false,
	"created":   false,
	"nsecs":     false,
	"time":      false,
	"timestamp": false,
	"rtime":     false,
	"filename":  true,
	"pathname":  true,
	"module":    false,
	"lineno":    true,
	"funcname":  true,
	"thread":    true,
	"process":   false,
	"message":   false,
}
const errString = "???"
func getShortFuncName(fname string) string {
	fns := strings.Split(fname, ".")
	return fns[len(fns)-1]
}
func (r *record) genRuntime() {
	calldepth := 4
	pc, file, line, ok := runtime.Caller(calldepth)
	if ok {
		fname := runtime.FuncForPC(pc).Name()
		r.pathname = file
		r.funcname = getShortFuncName(fname)
		r.filename = path.Base(file)
		r.lineno = line
	} else {
		r.pathname = errString
		r.funcname = errString
		r.filename = errString
		r.lineno = -1
	}
}
func (r *record) genNonRuntime(logger *Logger) {
	r.seqid = atomic.AddUint64(&(logger.seqid), 1)
	r.time = time.Now()
}
func (logger *Logger) lname(r *record) interface{} {
	return logger.name
}
func (logger *Logger) nextSeqid(r *record) interface{} {
	return r.seqid
}
func (logger *Logger) levelno(r *record) interface{} {
	return int32(r.level)
}
func (logger *Logger) levelname(r *record) interface{} {
	return levelNames[r.level]
}
func (logger *Logger) pathname(r *record) interface{} {
	return r.pathname
}
func (logger *Logger) filename(r *record) interface{} {
	return r.filename
}
func (logger *Logger) module(r *record) interface{} {
	module, _ := osext.Executable()
	return path.Base(module)
}
func (logger *Logger) lineno(r *record) interface{} {
	return r.lineno
}
func (logger *Logger) funcname(r *record) interface{} {
	return r.funcname
}
func (logger *Logger) created(r *record) interface{} {
	return logger.startTime.UnixNano()
}
func (logger *Logger) time(r *record) interface{} {
	return r.time.Format(logger.timeFormat)
}
func (logger *Logger) nsecs(r *record) interface{} {
	return logger.startTime.Nanosecond()
}
func (logger *Logger) timestamp(r *record) interface{} {
	return r.time.UnixNano()
}