Beispiel #1
0
func (l *logWriter) LogWrite(rec *log4go.LogRecord) {
	p := Prof.Enter("log")
	defer p.Exit()
	l.lock.Lock()
	defer l.lock.Unlock()
	fl := log4go.FormatLogRecord(log4go.FORMAT_DEFAULT, rec)
	l.log <- fl
}
Beispiel #2
0
func (t *testlogger) LogWrite(rec *log4go.LogRecord) {
	t.t.Log(strings.TrimSpace(log4go.FormatLogRecord(log4go.FORMAT_DEFAULT, rec)))
}