logfile

package module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 9 Imported by: 2

README

logfile-open

wrap the os.OpenFile to respect the USR1 signal

go get github.com/6543/logfile-open@latest
readWriteCloser, err := logfile.OpenFile("/tmp/some_file.log", 0o660)

Windows

if you compile this on windows it just open the file, as there is no such concept as signals. if you use the context aware open, the file will still be closed on context close.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenFile

func OpenFile(name string, perm os.FileMode) (io.ReadWriteCloser, error)

func OpenFileWithContext added in v1.1.0

func OpenFileWithContext(ctx context.Context, name string, perm os.FileMode) (io.ReadWriteCloser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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