// CreateFileLogWriter returns a LogWriterCreator that creates LogWriter for the given file.
CreateFileLogWriter returns a LogWriterCreator that creates LogWriter for the given file.
// CreateFileLogWriter returns a LogWriterCreator that creates LogWriter for the given file .
func CreateFileLogWriter(path string) (WriterCreator, error) {
	file, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
	if err != nil {
		return nil, err
	}
	file.Close()
	return func() Writer {
		file, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
		if err != nil {
			return nil
		}
		return &fileLogWriter{
			file:   file,
			logger: log.New(file, "", log.Ldate|log.Ltime),
		}
	}, nil
}
func CreateFileLogWriter ( path string ) ( WriterCreator , error ) { file , err := os . OpenFile ( path , os . O_APPEND | os . O_WRONLY | os . O_CREATE , 0600 ) if err != nil { return nil , err } file . Close ( ) return func ( ) Writer { file , err := os . OpenFile ( path , os . O_APPEND | os . O_WRONLY | os . O_CREATE , 0600 ) if err != nil { return nil } return & fileLogWriter { file : file , logger : log . New ( file , " " , log . Ldate | log . Ltime ) , } } , nil }
CreateFileLogWriter returns a LogWriterCreator that creates LogWriter for the given file.
CreateFileLogWriter returns a LogWriterCreator that creates LogWriter for the given file .