Beispiel #1
0
func Init(config config.Config) {
	debug := config.GetBool("log.debug")
	sys := config.GetBool("log.syslog")

	Debug = log.New(ioutil.Discard, "", 0)
	if sys {
		Info = newSyslogger(syslog.LOG_INFO)
		if debug {
			Debug = newSyslogger(syslog.LOG_DEBUG)
		}
	} else {
		Info = newLogger()
		if debug {
			Debug = newLogger()
		}
	}
}