logfile

package
v0.0.0-...-e718d2e Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RotatingWriterTimeFormat = "2006-01-02_15:04:05"

Functions

This section is empty.

Types

type RotatingWriter

type RotatingWriter struct {
	// contains filtered or unexported fields
}

RotatingWriter implements io.WriteCloser

func NewRotatingWriter

func NewRotatingWriter(filePath string, filePerm os.FileMode, rotateSize int64) (*RotatingWriter, error)

func (*RotatingWriter) Close

func (rw *RotatingWriter) Close() error

func (*RotatingWriter) FilePath

func (rw *RotatingWriter) FilePath() string

func (*RotatingWriter) RotateSize

func (rw *RotatingWriter) RotateSize() int64

func (*RotatingWriter) Sync

func (rw *RotatingWriter) Sync() error

Sync flushed the file by calling os.File.Sync.

func (*RotatingWriter) Write

func (rw *RotatingWriter) Write(msg []byte) (n int, err error)

Jump to

Keyboard shortcuts

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