func NewLTSVLogger(w io.Writer, debugEnabled bool, options ...Option) *LTSVLogger {
	l := &LTSVLogger{
		writer:           w,
		debugEnabled:     debugEnabled,
		timeLabel:        defaultTimeLabel,
		levelLabel:       defaultLevelLabel,
		appendPrefixFunc: defaultappendPrefixFuncType,
	}
	for _, o := range options {
		o(l)
	}
	if l.timeLabel != defaultTimeLabel || l.levelLabel != defaultLevelLabel {
		l.appendPrefixFunc = appendPrefixFunc(l.timeLabel, l.levelLabel)
	}
	return l
}
NewLTSVLogger creates a LTSV logger with the default time and value format.

The folloing two values are prepended to each log line.

The first value is the current time, and has the default label "time".
The time format is RFC3339 with microseconds in UTC timezone.
This format is the same as "2006-01-02T15:04:05.000000Z" in the
go time format https://golang.org/pkg/time/#Time.Format

The second value is the log level with the default label "level".
package ltsvlog
import (
	"io"
	"os"
	"strings"
	"time"
	"github.com/hnakamur/errstack"
)
type LogWriter interface {
	DebugEnabled() bool
	Debug() *Event
	Info() *Event
	Err(err error)
}
type appendPrefixFuncType func(buf []byte, level string) []byte
type LTSVLogger struct {
	writer           io.Writer
	debugEnabled     bool
	timeLabel        string
	levelLabel       string
	appendPrefixFunc appendPrefixFuncType
}
type Option func(l *LTSVLogger)
func SetTimeLabel(label string) Option {
	return func(l *LTSVLogger) {
		l.timeLabel = label
	}
}
func SetLevelLabel(label string) Option {
	return func(l *LTSVLogger) {
		l.levelLabel = label
	}
}
const (
	defaultTimeLabel  = "time"
	defaultLevelLabel = "level"
)
var defaultappendPrefixFuncType = appendPrefixFunc(defaultTimeLabel, defaultLevelLabel)