func ConfigureStdLevelLogger(defaultLoglevel LogLevel, w io.Writer, context string) {

	logFunc = func(level LogLevel, context string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			args = prepend(args, strings.Join([]string{level.String(), " "}, ""))
		} else {
			args = prepend(args, level.String(), " ", context, " ")
		}

		log.Print(args...)
	}

	loglnFunc = func(level LogLevel, context string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			args = prepend(args, level.String())
		} else {
			args = prepend(args, level.String(), context)
		}

		log.Println(args...)
	}

	logfFunc = func(level LogLevel, context string, msg string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			log.Printf(strings.Join([]string{level.String(), msg}, " "), args...)
		} else {
			log.Printf(strings.Join([]string{level.String(), context, msg}, " "), args...)
		}
	}

	Level = NewStdLevelLogger(context)
}
func ConfigureStdLevelLogger(defaultLoglevel LogLevel, w io.Writer, context string) {

	logFunc = func(level LogLevel, context string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			args = prepend(args, strings.Join([]string{level.String(), " "}, ""))
		} else {
			args = prepend(args, level.String(), " ", context, " ")
		}

		log.Print(args...)
	}

	loglnFunc = func(level LogLevel, context string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			args = prepend(args, level.String())
		} else {
			args = prepend(args, level.String(), context)
		}

		log.Println(args...)
	}

	logfFunc = func(level LogLevel, context string, msg string, args ...interface{}) {
		if defaultLoglevel > level {
			return
		}

		if w != nil {
			log.SetOutput(w)
		}

		if context == "" {
			log.Printf(strings.Join([]string{level.String(), msg}, " "), args...)
		} else {
			log.Printf(strings.Join([]string{level.String(), context, msg}, " "), args...)
		}
	}

	Level = NewStdLevelLogger(context)
}
func ConfigureStdLevelLogger ( defaultLoglevel LogLevel , w io . Writer , context string ) { logFunc = func ( level LogLevel , context string , args ... interface { } ) { if defaultLoglevel > level { return } if w != nil { log . SetOutput ( w ) } if context == " " { args = prepend ( args , strings . Join ( [ ] string { level . String ( ) , " " } , " " ) ) } else { args = prepend ( args , level . String ( ) , " " , context , " " ) } log . Print ( args ... ) } loglnFunc = func ( level LogLevel , context string , args ... interface { } ) { if defaultLoglevel > level { return } if w != nil { log . SetOutput ( w ) } if context == " " { args = prepend ( args , level . String ( ) ) } else { args = prepend ( args , level . String ( ) , context ) } log . Println ( args ... ) } logfFunc = func ( level LogLevel , context string , msg string , args ... interface { } ) { if defaultLoglevel > level { return } if w != nil { log . SetOutput ( w ) } if context == " " { log . Printf ( strings . Join ( [ ] string { level . String ( ) , msg } , " " ) , args ... ) } else { log . Printf ( strings . Join ( [ ] string { level . String ( ) , context , msg } , " " ) , args ... ) } } Level = NewStdLevelLogger ( context ) }
// ConfigureStdLevelLogger configures the standard level logger with the default log level.
// By providing a different io.Writer and prefix you can control the logging output (testing etc)
ConfigureStdLevelLogger configures the standard level logger with the default log level . By providing a different io . Writer and prefix you can control the logging output ( testing etc )