(basePath string, rolling RollingFormat)
| 103 | } |
| 104 | |
| 105 | func NewRollingFile(basePath string, rolling RollingFormat) (io.WriteCloser, error) { |
| 106 | if _, file := filepath.Split(basePath); file == "" { |
| 107 | return nil, errors.Errorf("invalid base-path = %s, file name is required", basePath) |
| 108 | } |
| 109 | return &rollingFile{basePath: basePath, rolling: rolling}, nil |
| 110 | } |