func (logger *Logger) GetHandler() io.Writer {
	return logger.output
}
GetHandler returns the io.Writer object that is on the logger.
package memfs
import (
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
	"strings"
	"time"
)
type LogLevel int
const (
	LevelDebug LogLevel = 1 + iota
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
)
var levelNames = []string{
	"DEBUG", "INFO", "WARN", "ERROR", "FATAL",
}
func (level LogLevel) String() string {
	return levelNames[level-1]
}
func LevelFromString(level string) LogLevel {
	level = strings.ToUpper(level)
	level = strings.Trim(level, " ")
	switch level {
	case "DEBUG":
		return LevelDebug
	case "INFO":
		return LevelInfo
	case "WARN":
		return LevelWarn
	case "WARNING":
		return LevelWarn
	case "ERROR":
		return LevelError
	case "FATAL":
		return LevelFatal
	default:
		return LevelInfo
	}
}
type Logger struct {
	Level  LogLevel        
	logger *log.Logger     
	output io.WriteCloser  
}
func InitLogger(path string, level string) (*Logger, error) {
	newLogger := new(Logger)
	newLogger.Level = LevelFromString(level)
	if path != "" {
		var err error
		newLogger.output, err = os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
		if err != nil {
			return nil, err
		}
	} else {
		newLogger.output = os.Stdout
	}
	newLogger.logger = log.New(newLogger.output, "", 0)
	return newLogger, nil
}
func (logger *Logger) Close() error {
	if err := logger.output.Close(); err != nil {
		return err
	}
	return nil
}