util

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set_up_logging_panic_on_err

func Set_up_logging_panic_on_err(logging_dir string, filename string, logfileprefix string, maxlogfilesize_bytes int64, directorymaxsize_bytes int64)

Types

type FileEntry

type FileEntry struct {
	FilePath    string
	FileInfo    fs.FileInfo
	TimeCreated time.Time
}

This struct is copied from LogFileDeleter.go

type RotateWriter

type RotateWriter struct {
	DirectorySizeLimitBytes int64
	LogFilePath             string
	// contains filtered or unexported fields
}

func NewRotateWriter

func NewRotateWriter(logfilepath string, loggingdir string, logfileprefix string, maxfilesize_bytes int64, directorymaxsize_bytes int64) *RotateWriter

Make a new RotateWriter. Return nil if error occurs during setup.

func (*RotateWriter) Rotate

func (w *RotateWriter) Rotate()

Perform the actual act of creating a new file and closing the existing file. Panics if anything goes wrong.

func (*RotateWriter) Write

func (w *RotateWriter) Write(dangerous_string []byte) (int, error)

Write satisfies the io.Writer interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL