func NewLogger(output *os.File) *Logger {
	return &Logger{
		logger: log.New(output, "", log.LstdFlags),
		file:   output,
	}
}
NewLogger creates and returns a new Logger object
initialized with file for output.
package test
import (
	"fmt"
	"log"
	"os"
	"strings"
)
type LogLevel int
const (
	LogOffLvl   LogLevel = iota
	LogPanicLvl          = LogOffLvl
	LogErrorsLvl
	LogWarningsLvl
	LogInfoLvl
	LogDebugLvl
)
var loglevel = LogWarningsLvl
type Logger struct {
	logger *log.Logger
	file   *os.File
}
func LogPanic(v ...interface{}) {
	log.Panic(v...)
}
func LogErrorsIfNotNil(err error, v ...interface{}) {
	if loglevel >= LogErrorsLvl && err != nil {
		t := fmt.Sprintln(v...)
		log.Println("EE:", strings.TrimSpace(t), err)
	}
}
func LogError(v ...interface{}) {
	if loglevel >= LogErrorsLvl {
		t := fmt.Sprintln(v...)
		log.Println("EE:", t)
	}
}
func LogWarning(v ...interface{}) {
	if loglevel >= LogWarningsLvl {
		t := fmt.Sprintln(v...)
		log.Println("WW:", t)
	}
}
func LogInfo(v ...interface{}) {
	if loglevel >= LogInfoLvl {
		log.Println(v...)
	}
}
func LogDebug(v ...interface{}) {
	if loglevel >= LogDebugLvl {
		t := fmt.Sprintln(v...)
		log.Print("DD: ", t)
	}
}
func SetLogLevel(ll LogLevel) {
	loglevel = ll
}