Documentation ¶
Index ¶
- func CompressLogFiles(compressFile []string, filePath string)
- func CreateFile(filename string) (*os.File, error)
- func GenerateFileNme(path string, name string, suffix string, clock interface{ ... }, ...) string
- func GenerateFn(pattern *strftime.Strftime, clock interface{ ... }, rotationTime time.Duration) string
- func GenerateFnForFileSize(pattern *strftime.Strftime, clock interface{ ... }) string
- func GetNewFileName(filePath string, fileName string, rotationSize int64, clock interface{ ... }) string
- func ParseTimeFromFileName(fileNameTimeFormat string, fileName string, clock time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressLogFiles ¶
func CreateFile ¶
CreateFile creates a new file in the given path, creating parent directories as necessary
func GenerateFileNme ¶
func GenerateFileNme(path string, name string, suffix string, clock interface{ Now() time.Time }, timeFormat string) string
产生新的文件名(用于按大小分割文件)
func GenerateFn ¶
func GenerateFn(pattern *strftime.Strftime, clock interface{ Now() time.Time }, rotationTime time.Duration) string
GenerateFn creates a file name based on the pattern, the current time, and the rotation time.
The bsase time that is used to generate the filename is truncated based on the rotation time.
func GenerateFnForFileSize ¶
产生新的文件名(用于按大小分割文件)
func GetNewFileName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.