fileLogger.go
func (f *FileLogger) initLoggerByDaily() {

	t, _ := time.Parse(DATEFORMAT, time.Now().Format(DATEFORMAT))

	f.date = &t
	f.mu.Lock()
	defer f.mu.Unlock()

	logFile := joinFilePath(f.fileDir, f.fileName)
	if !f.isMustSplit() {
		if !isExist(f.fileDir) {
			os.Mkdir(f.fileDir, 0755)
		}
		f.logFile, _ = os.OpenFile(logFile, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
		f.lg = log.New(f.logFile, f.prefix, log.LstdFlags|log.Lmicroseconds)
	} else {
		f.split()
	}

	go f.logWriter()
	go f.fileMonitor()
}
func (f *FileLogger) initLoggerByDaily() {

	t, _ := time.Parse(DATEFORMAT, time.Now().Format(DATEFORMAT))

	f.date = &t
	f.mu.Lock()
	defer f.mu.Unlock()

	logFile := joinFilePath(f.fileDir, f.fileName)
	if !f.isMustSplit() {
		if !isExist(f.fileDir) {
			os.Mkdir(f.fileDir, 0755)
		}
		f.logFile, _ = os.OpenFile(logFile, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
		f.lg = log.New(f.logFile, f.prefix, log.LstdFlags|log.Lmicroseconds)
	} else {
		f.split()
	}

	go f.logWriter()
	go f.fileMonitor()
}
// init fileLogger split by daily