File: README.md

package info (click to toggle)
golang-blitiri-go-log 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 84 kB
  • sloc: makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

# blitiri.com.ar/go/log

[![GoDoc](https://godoc.org/blitiri.com.ar/go/log?status.svg)](https://godoc.org/blitiri.com.ar/go/log)
[![Build Status](https://travis-ci.org/albertito/log.svg?branch=master)](https://travis-ci.org/albertito/log)
[![Go Report Card](https://goreportcard.com/badge/github.com/albertito/log)](https://goreportcard.com/report/github.com/albertito/log)

[log](https://godoc.org/blitiri.com.ar/go/log) is a Go package implementing a
simple logger.

It implements an API somewhat similar to [glog](github.com/google/glog), with
a focus towards simplicity and integration with standard tools such as
systemd.


## Examples

```go
log.Init()  // only needed once.

log.Debugf("debugging information: %v", x)
log.Infof("something normal happened")
log.Errorf("something bad happened")
log.Fatalf("tragic")

if log.V(3) {  // only entered if -v was >= 3.
	expensiveDebugging()
}
```


## Status

The API should be considered generally stable, and no backwards-incompatible
changes are expected.

Some specific symbols are experimental, and are marked as such in their
documentation.  Those might see backwards-incompatible changes, including
removing them entirely.


## Contact

If you have any questions, comments or patches please send them to
albertito@blitiri.com.ar.