func Print(ctx context.Context, msg string, args ...interface{}) {
	sendToAppender(ctx, InfoLevel, nil, msg, args...)
}
Print emits a log entry at the INFO level.
package gournal
import (
	"context"
	"fmt"
	"os"
	"strconv"
	"strings"
)
var debug, _ = strconv.ParseBool(os.Getenv("GOURNAL_DEBUG"))
var (
	ErrorKey = "error"
	DefaultLevel = ErrorLevel
	DefaultAppender = NewAppender()
	DefaultContext = context.Background()
)
type contextKey uint8
const (
	levelKeyC contextKey = iota
	fieldsKeyC
	appenderKeyC
)
var (
	levelKey    interface{} = levelKeyC
	fieldsKey   interface{} = fieldsKeyC
	appenderKey interface{} = appenderKeyC
)
func LevelKey() interface{} {
	return levelKey
}
func FieldsKey() interface{} {
	return fieldsKey
}
func AppenderKey() interface{} {
	return appenderKey
}
type Level uint8
const (
	UnknownLevel Level = iota
	PanicLevel
	FatalLevel
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
	levelCount
)
const (
	unknownLevelStr = "UNKNOWN"
	panicLevelStr   = "PANIC"
	fatalLevelStr   = "FATAL"
	errorLevelStr   = "ERROR"
	warnLevelStr    = "WARN"
	warningLevelStr = "WARNING"
	infoLevelStr    = "INFO"
	debugLevelStr   = "DEBUG"
)
var (
	lvlValsToStrs = [levelCount]string{
		unknownLevelStr,
		panicLevelStr,
		fatalLevelStr,
		errorLevelStr,
		warnLevelStr,
		infoLevelStr,
		debugLevelStr,
	}
)
func (level Level) String() string {
	if level < PanicLevel || level >= levelCount {
		return lvlValsToStrs[UnknownLevel]
	}
	return lvlValsToStrs[level]
}
func ParseLevel(lvl string) Level {
	switch {
	case strings.EqualFold(lvl, debugLevelStr):
		return DebugLevel
	case strings.EqualFold(lvl, infoLevelStr):
		return InfoLevel
	case strings.EqualFold(lvl, warnLevelStr),
		strings.EqualFold(lvl, warningLevelStr):
		return WarnLevel
	case strings.EqualFold(lvl, errorLevelStr):
		return ErrorLevel
	case strings.EqualFold(lvl, fatalLevelStr):
		return FatalLevel
	case strings.EqualFold(lvl, panicLevelStr):
		return PanicLevel
	}
	return UnknownLevel
}
type Logger interface {
	Debug(msg string, args ...interface{})
	Info(msg string, args ...interface{})
	Print(msg string, args ...interface{})
	Warn(msg string, args ...interface{})
	Error(msg string, args ...interface{})
	Fatal(msg string, args ...interface{})
	Panic(msg string, args ...interface{})
}
func New(ctx context.Context) Logger {
	return &logger{ctx}
}
type logger struct {
	ctx context.Context
}
func (l *logger) Debug(msg string, args ...interface{}) {
	Debug(l.ctx, msg, args...)
}
func (l *logger) Info(msg string, args ...interface{}) {
	Info(l.ctx, msg, args...)
}
func (l *logger) Print(msg string, args ...interface{}) {
	Print(l.ctx, msg, args...)
}
func (l *logger) Warn(msg string, args ...interface{}) {
	Warn(l.ctx, msg, args...)
}
func (l *logger) Error(msg string, args ...interface{}) {
	Error(l.ctx, msg, args...)
}
func (l *logger) Fatal(msg string, args ...interface{}) {
	Fatal(l.ctx, msg, args...)
}
func (l *logger) Panic(msg string, args ...interface{}) {
	Panic(l.ctx, msg, args...)
}
type Entry interface {
	WithField(key string, value interface{}) Entry
	WithFields(fields map[string]interface{}) Entry
	WithError(err error) Entry
	Debug(ctx context.Context, msg string, args ...interface{})
	Info(ctx context.Context, msg string, args ...interface{})
	Print(ctx context.Context, msg string, args ...interface{})
	Warn(ctx context.Context, msg string, args ...interface{})
	Error(ctx context.Context, msg string, args ...interface{})
	Fatal(ctx context.Context, msg string, args ...interface{})
	Panic(ctx context.Context, msg string, args ...interface{})
}
type Appender interface {
	Append(
		ctx context.Context,
		lvl Level,
		fields map[string]interface{},
		msg string)
}
func WithField(key string, value interface{}) Entry {
	return &entry{map[string]interface{}{key: value}}
}
func WithFields(fields map[string]interface{}) Entry {
	return &entry{fields}
}
func WithError(err error) Entry {
	return &entry{map[string]interface{}{ErrorKey: err.Error()}}
}
func Debug(ctx context.Context, msg string, args ...interface{}) {
	sendToAppender(ctx, DebugLevel, nil, msg, args...)
}
func Info(ctx context.Context, msg string, args ...interface{}) {
	sendToAppender(ctx, InfoLevel, nil, msg, args...)
}