File: README.md

package info (click to toggle)
golang-github-bsphere-le-go 0.0~git20170215.0.7a984a8-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-proposed-updates, bullseye, sid, trixie
  • size: 92 kB
  • sloc: makefile: 2
file content (37 lines) | stat: -rw-r--r-- 925 bytes parent folder | download | duplicates (2)
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
le_go
=====

Golang client library for logentries.com

It is compatible with http://golang.org/pkg/log/#Logger
and also implements http://golang.org/pkg/io/#Writer

[![GoDoc](https://godoc.org/github.com/bsphere/le_go?status.png)](https://godoc.org/github.com/bsphere/le_go)

[![Build Status](https://travis-ci.org/bsphere/le_go.svg)](https://travis-ci.org/bsphere/le_go)

Usage
-----
Add a new manual TCP token log at [logentries.com](https://logentries.com/quick-start/) and copy the [token](https://logentries.com/doc/input-token/).

Installation: `go get github.com/bsphere/le_go`

**Note:** The Logger is blocking, it can be easily run in a goroutine by calling `go le.Println(...)`

```go
package main

import "github.com/bsphere/le_go"

func main() {
	le, err := le_go.Connect("XXXX-XXXX-XXXX-XXXX") // replace with token
	if err != nil {
		panic(err)
	}

	defer le.Close()

	le.Println("another test message")
}
```