https://github.com/paulcager/rlog
Lightweight rolling log file package.
https://github.com/paulcager/rlog
golang logging
Last synced: about 1 year ago
JSON representation
Lightweight rolling log file package.
- Host: GitHub
- URL: https://github.com/paulcager/rlog
- Owner: paulcager
- License: apache-2.0
- Created: 2017-11-14T18:55:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-11T18:31:18.000Z (over 5 years ago)
- Last Synced: 2025-03-11T07:51:55.481Z (over 1 year ago)
- Topics: golang, logging
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github.com/paulcager/rlog
## Lightweight rolling log file package.
Package rlog provides a rotated log file. Log files will be rotated on a given time boundary (e.g.
daily), and an action (such as compression) may be specified to be performed when rotation happens.
### Usage
w, err := rlog.NewWriter(tmp+"/rlog-test-$h$m$s.txt", time.Minute, rlog.GZIPOnRotate)
if err != nil {
panic(err)
}
defer w.Close()
fmt.FPrintln(w, "Hello, world")