Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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