func EnvPrefix(envPrefix string) OptionsModifier {
	return func(opt *Options) {
		opt.EnvPrefix = envPrefix
	}
}
EnvPrefix sets a prefix for evaluating logger settings from env
package vlog
import (
	"context"
	"fmt"
	"strings"
	"github.com/sethvargo/go-envconfig"
)
const defaultEnvPrefix = "VLOG"
const (
	LogLevelTrace = "trace"  
	LogLevelDebug = "debug"  
	LogLevelInfo  = "info"   
	LogLevelWarn  = "warn"   
	LogLevelError = "error"  
)
var levelStringMap = map[string]int{
	LogLevelTrace: 5,
	LogLevelDebug: 4,
	LogLevelInfo:  3,
	LogLevelWarn:  2,
	LogLevelError: 1,
}
type Options struct {
	Level       int         `env:"-"`
	LevelString string      `env:"_LOG_LEVEL"`
	Filepath    string      `env:"_LOG_FILE"`
	LogPrefix   string      `env:"_LOG_PREFIX"`
	EnvPrefix   string      `env:"-"`
	AppMeta     interface{} `env:"-"`
	PreLogHook  LogHookFunc `env:"-"`
}
type LogHookFunc func([]byte)
type OptionsModifier func(*Options)
func newOptions(mods ...OptionsModifier) *Options {
	opts := defaultOptions()
	for _, mod := range mods {
		mod(opts)
	}
	envPrefix := defaultEnvPrefix
	if opts.EnvPrefix != "" {
		envPrefix = opts.EnvPrefix
	}
	opts.finalize(envPrefix)
	return opts
}
func Level(level string) OptionsModifier {
	return func(opt *Options) {
		opt.Level = logLevelValFromString(level)
	}
}
func ToFile(filepath string) OptionsModifier {
	return func(opt *Options) {
		opt.Filepath = filepath
	}
}
func LogPrefix(logPrefix string) OptionsModifier {
	return func(opt *Options) {
		opt.LogPrefix = logPrefix
	}
}