Пример #1
0
// Out is to output log
func (lo *Object) Out(key string, v ...interface{}) {
	nv := u.Unshift(v, getPrefix(key))

	if lo.logLevel <= getStatus(key) {
		if lo.logFileLevel <= getStatus(key) {
			lo.loggerFile.Output(2, fmt.Sprint(nv...))
		} else {
			lo.loggerStd.Output(2, fmt.Sprint(nv...))
		}
	}
}
Пример #2
0
// out is to output log
func out(key string, v ...interface{}) {
	nv := u.Unshift(v, getPrefix(key))

	if logLevel <= getStatus(key) {
		if logFileLevel <= getStatus(key) {
			//file
			logFileOut.Output(3, fmt.Sprint(nv...))
		} else {
			logStdOut.Output(3, fmt.Sprint(nv...))
		}
	}
}