Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/6543/logfile-open

wrap the os.OpenFile to respect the USR1 signal
https://github.com/6543/logfile-open

golang golang-library linux logfile

Last synced: 2 months ago
JSON representation

wrap the os.OpenFile to respect the USR1 signal

Awesome Lists containing this project

README

        

# logfile-open
wrap the os.OpenFile to respect the USR1 signal

```
go get github.com/6543/logfile-open@latest
```

```go
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.