func Error(arg0 interface{}, args ...interface{}) error {
	const (
		lvl = ERROR
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
		return errors.New(fmt.Sprintf(first, args...))
	case func() string:
		str := first()
		Global.intLogf(lvl, "%s", str)
		return errors.New(str)
	default:
		Global.intLogf(lvl, fmt.Sprint(first)+strings.Repeat(" %v", len(args)), args...)
		return errors.New(fmt.Sprint(first) + fmt.Sprintf(strings.Repeat(" %v", len(args)), args...))
	}
	return nil
}
Utility for error log messages (returns an error for easy function returns) (see Debug() for parameter explanation)
These functions will execute a closure exactly once, to build the error message for the return
Wrapper for (*Logger).Error
package log4go
import (
	"errors"
	"os"
	"fmt"
	"strings"
)
var (
	Global Logger
)
func init() {
	Global = NewDefaultLogger(DEBUG)
}
func LoadConfiguration(filename string) {
	Global.LoadConfiguration(filename)
}
func AddFilter(name string, lvl level, writer LogWriter) {
	Global.AddFilter(name, lvl, writer)
}
func Close() {
	Global.Close()
}
func Crash(args ...interface{}) {
	if len(args) > 0 {
		Global.intLogf(CRITICAL, strings.Repeat(" %v", len(args))[1:], args...)
	}
	panic(args)
}
func Crashf(format string, args ...interface{}) {
	Global.intLogf(CRITICAL, format, args...)
	Global.Close()  
	panic(fmt.Sprintf(format, args...))
}
func Exit(args ...interface{}) {
	if len(args) > 0 {
		Global.intLogf(ERROR, strings.Repeat(" %v", len(args))[1:], args...)
	}
	Global.Close()  
	os.Exit(0)
}
func Exitf(format string, args ...interface{}) {
	Global.intLogf(ERROR, format, args...)
	Global.Close()  
	os.Exit(0)
}
func Stderr(args ...interface{}) {
	if len(args) > 0 {
		Global.intLogf(ERROR, strings.Repeat(" %v", len(args))[1:], args...)
	}
}
func Stderrf(format string, args ...interface{}) {
	Global.intLogf(ERROR, format, args...)
}
func Stdout(args ...interface{}) {
	if len(args) > 0 {
		Global.intLogf(INFO, strings.Repeat(" %v", len(args))[1:], args...)
	}
}
func Stdoutf(format string, args ...interface{}) {
	Global.intLogf(INFO, format, args...)
}
func Log(lvl level, source, message string) {
	Global.Log(lvl, source, message)
}
func Logf(lvl level, format string, args ...interface{}) {
	Global.intLogf(lvl, format, args...)
}
func Logc(lvl level, closure func() string) {
	Global.intLogc(lvl, closure)
}
func Finest(arg0 interface{}, args ...interface{}) {
	const (
		lvl = FINEST
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
	case func() string:
		Global.intLogc(lvl, first)
	default:
		Global.intLogf(lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
}
func Fine(arg0 interface{}, args ...interface{}) {
	const (
		lvl = FINE
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
	case func() string:
		Global.intLogc(lvl, first)
	default:
		Global.intLogf(lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
}
func Debug(arg0 interface{}, args ...interface{}) {
	const (
		lvl = DEBUG
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
	case func() string:
		Global.intLogc(lvl, first)
	default:
		Global.intLogf(lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
}
func Trace(arg0 interface{}, args ...interface{}) {
	const (
		lvl = TRACE
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
	case func() string:
		Global.intLogc(lvl, first)
	default:
		Global.intLogf(lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
}
func Info(arg0 interface{}, args ...interface{}) {
	const (
		lvl = INFO
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
	case func() string:
		Global.intLogc(lvl, first)
	default:
		Global.intLogf(lvl, fmt.Sprint(arg0)+strings.Repeat(" %v", len(args)), args...)
	}
}
func Warn(arg0 interface{}, args ...interface{}) error {
	const (
		lvl = WARNING
	)
	switch first := arg0.(type) {
	case string:
		Global.intLogf(lvl, first, args...)
		return errors.New(fmt.Sprintf(first, args...))
	case func() string:
		str := first()
		Global.intLogf(lvl, "%s", str)
		return errors.New(str)
	default:
		Global.intLogf(lvl, fmt.Sprint(first)+strings.Repeat(" %v", len(args)), args...)
		return errors.New(fmt.Sprint(first) + fmt.Sprintf(strings.Repeat(" %v", len(args)), args...))
	}
	return nil
}