func (async *Async) Close() {
	close(async.chanClose)
	close(async.chanData)
	for data := range async.chanData {
		async.writer.Write(data.Bytes, data.Record)
	}
}
Close closes the internal channel and waits until all logs in the channel
have been output. It does NOT close the underlying writer.
package writer
import (
	"github.com/gxlog/gxlog/iface"
)
type logData struct {
	Bytes  []byte
	Record *iface.Record
}
type Async struct {
	writer    iface.Writer
	chanData  chan logData
	chanClose chan struct{}
}
func NewAsync(writer iface.Writer, cap int) *Async {
	async := &Async{
		writer:    writer,
		chanData:  make(chan logData, cap),
		chanClose: make(chan struct{}),
	}
	go async.serve()
	return async
}
func (async *Async) Write(bs []byte, record *iface.Record) {
	async.chanData <- logData{Bytes: bs, Record: record}
}