filelog

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLog

type FileLog struct {
	AppName  string
	FilePath string
	Date     time.Time
	// contains filtered or unexported fields
}

func New

func New(appName string, bufferSize int) *FileLog

func (*FileLog) Close

func (fl *FileLog) Close()

func (*FileLog) GetEnable

func (fl *FileLog) GetEnable() bool

GetEnable returns the current value of the fl.Enable flag in a thread-safe manner using atomic operations.

func (*FileLog) SetEnable

func (fl *FileLog) SetEnable(enable bool)

SetEnable sets the fl.Enable flag in a thread-safe manner using atomic operations.

func (*FileLog) Write

func (fl *FileLog) Write(p []byte) (n int, err error)

Write writes the provided byte slice to the log file, creating the file if necessary.

Jump to

Keyboard shortcuts

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