func (r *record) genNonRuntime(logger *Logger) {
	r.seqid = atomic.AddUint64(&(logger.seqid), 1)
	r.time = time.Now()
}
genNonRuntime generates the non-runtime information, including sequential
id and time.
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
	}
}