func (b *BufferLogger) WriteTo(l Logger) {
	b.Lock()
	defer b.Unlock()
	for _, items := range b.buf {
		l.Log(items...)
	}
	b.buf = nil
}
WriteTo sends recorded log messages to another Logger in order.
package log
import (
	"log"
	"sync"
)
func init() {
	log.SetFlags(log.LstdFlags | log.Lmicroseconds)
}
type Logger interface {
	Log(items ...interface{})
}
type ConsoleLogger struct{}
func (l ConsoleLogger) Log(items ...interface{}) {
	log.Println(items...)
}
type BufferLogger struct {
	sync.Mutex
	buf [][]interface{}
}
func (b *BufferLogger) Log(items ...interface{}) {
	b.Lock()
	defer b.Unlock()
	b.buf = append(b.buf, items)
}