File: apexlogs_test.go

package info (click to toggle)
golang-github-apex-log 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, bullseye, experimental, forky, sid, trixie
  • size: 316 kB
  • sloc: makefile: 4
file content (25 lines) | stat: -rw-r--r-- 437 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
package apexlogs_test

import (
	"testing"

	"github.com/tj/assert"

	"github.com/apex/log"
	"github.com/apex/log/handlers/apexlogs"
)

func Test(t *testing.T) {
	t.SkipNow()

	h := apexlogs.Handler{
		URL:       "http://localhost:5001",
		ProjectID: "production",
	}

	log.SetHandler(&h)
	log.WithField("user", "tj").WithField("id", "123").Info("hello")
	log.Info("world")
	log.Error("boom")
	assert.NoError(t, h.Flush(), "flushing")
}