Documentation
¶
Index ¶
Constants ¶
View Source
const ( CheckAnimDuration = 290 * time.Millisecond DeleteAnimDuration = 200 * time.Millisecond FPS = 60 )
Variables ¶
View Source
var ( StorageType = "file" // file, s3, mongodb, postgres // Log rotation configuration LogMaxSize = int64(10 * 1024 * 1024) // 10MB max size per log file LogMaxFiles = 5 // Keep 5 log files LogCompressOld = true // Compress old log files )
Functions ¶
This section is empty.
Types ¶
type LogFileInfo ¶
LogFileInfo contains information about a log file
type LogRotator ¶
type LogRotator struct {
// contains filtered or unexported fields
}
LogRotator handles log file rotation based on size and file count limits
func NewLogRotator ¶
func NewLogRotator(logPath string, maxSize int64, maxFiles int, compressOld bool) *LogRotator
NewLogRotator creates a new log rotator
func (*LogRotator) GetLogFiles ¶
func (lr *LogRotator) GetLogFiles() ([]LogFileInfo, error)
GetLogFiles returns information about current log files
type RotatingWriter ¶
type RotatingWriter struct {
Writer io.Writer
Rotator *LogRotator
}
RotatingWriter wraps an io.Writer and performs rotation when needed
func NewRotatingWriter ¶
func NewRotatingWriter(writer io.Writer, rotator *LogRotator) *RotatingWriter
NewRotatingWriter creates a new rotating writer
Click to show internal directories.
Click to hide internal directories.