func NewEntry(depth int) *Entry {
	e := &Entry{}
	_, e.File, e.Line, _ = runtime.Caller(depth)
	buf := make([]byte, 4096)
	e.Stacktrace = string(buf[:runtime.Stack(buf, false)])
	return e
}
NewEntry returns an Entry item prefilled with debug info.
package log
import (
	"fmt"
	"github.com/mgutz/ansi"
	"github.com/tav/golly/process"
	stdlog "log"
	"os"
	"runtime"
	"text/template"
	"time"
)
type Entry struct {
	Context    string      `codec:"ctx"                  json:"ctx"`
	Data       interface{} `codec:"data"                 json:"data"`
	Error      bool        `codec:"error"                json:"error"`
	File       string      `codec:"file,omitempty"       json:"file,omitempty"`
	Line       int         `codec:"line,omitempty"       json:"line,omitempty"`
	Message    string      `codec:"msg"                  json:"msg"`
	Stacktrace string      `codec:"stacktrace,omitempty" json:"stacktrace,omitempty"`
	Timestamp  time.Time   `codec:"timestamp"            json:"timestamp"`
}
type LogType int
const (
	InfoLog LogType = 1 << iota
	ErrorLog
	MixedLog LogType = InfoLog | ErrorLog
)
var Must must
type must struct{}
func (m must) StreamHandler(o *Options) Handler {
	h, err := StreamHandler(o)
	if err != nil {
		panic(err)
	}
	return h
}
func (m must) TemplateFormatter(tmpl string, color bool, funcs template.FuncMap) Formatter {
	f, err := TemplateFormatter(tmpl, color, funcs)
	if err != nil {
		panic(err)
	}
	return f
}
func New(ctx string) *Logger {
	return root.New(ctx)
}
func Flush() {
	root.Flush()
}
func Debug(args ...interface{}) {
	root.log(fmt.Sprint(args...), nil, false, true)
}
func Debugf(format string, args ...interface{}) {
	root.log(fmt.Sprintf(format, args...), nil, false, true)
}
func DebugData(message string, data interface{}) {
	root.log(message, data, false, true)
}
func Error(args ...interface{}) {
	root.log(fmt.Sprint(args...), nil, true, false)
}
func Errorf(format string, args ...interface{}) {
	root.log(fmt.Sprintf(format, args...), nil, true, false)
}
func ErrorData(message string, data interface{}) {
	root.log(message, data, true, false)
}
func Fatal(args ...interface{}) {
	root.log(fmt.Sprint(args...), nil, true, false)
	process.Exit(1)
}
func Fatalf(format string, args ...interface{}) {
	root.log(fmt.Sprintf(format, args...), nil, true, false)
	process.Exit(1)
}
func Info(args ...interface{}) {
	root.log(fmt.Sprint(args...), nil, false, false)
}
func Infof(format string, args ...interface{}) {
	root.log(fmt.Sprintf(format, args...), nil, false, false)
}
func InfoData(message string, data interface{}) {
	root.log(message, data, false, false)
}
func LogEntry(e *Entry) {
	root.logEntry(e, false, 2)
}