func Debugln(args ...interface{}) {
	if logLevel >= LogLevelDebug {
		args = append([]interface{}{getPrefix("DEBUG")}, args...)
		log.Println(args...)
	}
}
Debugln prints debug logs, followed by a new line.
package logging
import (
	"fmt"
	"io"
	"log"
	"os"
)
type LogLevel int
const (
	LogLevelError LogLevel = 0
	LogLevelWarning LogLevel = 1
	LogLevelInfo LogLevel = 2
	LogLevelDebug LogLevel = 3
)
var logLevel = LogLevelError  
func SetLogLevel(newLevel int) {
	logLevel = LogLevel(newLevel)
}
func SetLogFile(logFile io.Writer) {
	log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)
	logOutput := io.MultiWriter(os.Stdout, logFile)
	log.SetOutput(logOutput)
}
func getPrefix(level string) string {
	return fmt.Sprintf("[%s]", level)
}
func Fatalln(args ...interface{}) {
	log.Fatalln(args...)
}
func Fatalf(format string, args ...interface{}) {
	log.Fatalf(format, args...)
}
func Fatal(args ...interface{}) {
	log.Fatal(args...)
}
func Debugf(format string, args ...interface{}) {
	if logLevel >= LogLevelDebug {
		log.Printf(fmt.Sprintf("%s %s", getPrefix("DEBUG"), format), args...)
	}
}
func Infof(format string, args ...interface{}) {
	if logLevel >= LogLevelInfo {
		log.Printf(fmt.Sprintf("%s %s", getPrefix("INFO"), format), args...)
	}
}
func Warnf(format string, args ...interface{}) {
	if logLevel >= LogLevelWarning {
		log.Printf(fmt.Sprintf("%s %s", getPrefix("WARN"), format), args...)
	}
}
func Errorf(format string, args ...interface{}) {
	if logLevel >= LogLevelError {
		log.Printf(fmt.Sprintf("%s %s", getPrefix("ERROR"), format), args...)
	}
}