fileLogger.go
func NewSizeLogger(fileDir, fileName, prefix string, fileCount int, fileSize int64, unit UNIT,
	logScan int64, logSeq int) *FileLogger {
	sizeLogger := &FileLogger{
		splitType:  SplitType_Size,
		mu:         new(sync.RWMutex),
		fileDir:    fileDir,
		fileName:   fileName,
		fileCount:  fileCount,
		fileSize:   fileSize * int64(unit),
		prefix:     prefix,
		logScan:    logScan,
		logChan:    make(chan string, logSeq),
		logLevel:   DEFAULT_LOG_LEVEL,
		logConsole: false,
	}

	sizeLogger.initLogger()

	return sizeLogger
}
func NewSizeLogger(fileDir, fileName, prefix string, fileCount int, fileSize int64, unit UNIT,
	logScan int64, logSeq int) *FileLogger {
	sizeLogger := &FileLogger{
		splitType:  SplitType_Size,
		mu:         new(sync.RWMutex),
		fileDir:    fileDir,
		fileName:   fileName,
		fileCount:  fileCount,
		fileSize:   fileSize * int64(unit),
		prefix:     prefix,
		logScan:    logScan,
		logChan:    make(chan string, logSeq),
		logLevel:   DEFAULT_LOG_LEVEL,
		logConsole: false,
	}

	sizeLogger.initLogger()

	return sizeLogger
}
// NewSizeLogger return a logger split by fileSize
// Parameters:
// 		file directory
// 		file name
// 		log's prefix
// 		fileCount holds maxCount of bak file
//		fileSize holds each of bak file's size
// 		unit stands for kb, mb, gb, tb
//		logScan after a logScan time will check fileLogger isMustSplit, default is 300s