add flush & read all chan data

This commit is contained in:
astaxie
2013-11-27 17:50:10 +08:00
parent 690d77e985
commit ba5e393e99
5 changed files with 35 additions and 1 deletions

View File

@@ -237,6 +237,10 @@ func (w *FileLogWriter) Destroy() {
w.mw.fd.Close()
}
func (w *FileLogWriter) Flush() {
w.mw.fd.Sync()
}
func init() {
Register("file", NewFileWriter)
}