Documentation ¶
Index ¶
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a new file in the given path, creating parent directories as necessary
func GenerateFileNme ¶ added in v1.16.0
func GenerateFileNme(path string, name string, suffix string, clock interface{ Now() time.Time }) 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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.