Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remeh/logr
logr is a small log rotating struct compatible with io.Writer, suitable for the default log package
https://github.com/remeh/logr
Last synced: about 1 month ago
JSON representation
logr is a small log rotating struct compatible with io.Writer, suitable for the default log package
- Host: GitHub
- URL: https://github.com/remeh/logr
- Owner: remeh
- License: mit
- Created: 2016-01-20T12:52:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-20T13:24:06.000Z (almost 9 years ago)
- Last Synced: 2024-10-12T22:30:42.960Z (2 months ago)
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
logr
====logr is a simplistic type which implements log rotating, suitable for use with Go's `log` package.
[![Build Status](https://travis-ci.org/vrischmann/logr.svg?branch=master)](https://travis-ci.org/vrischmann/logr)
[![GoDoc](https://godoc.org/github.com/vrischmann/logr?status.svg)](https://godoc.org/github.com/vrischmann/logr)Usage
-----Use it like this.
```go
w := logr.NewWriter("/var/log/mylog.log")
log.SetOutput(w)log.Println("foobar")
```Future works
------------* Custom time suffix formats