Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 5ebe5df

Browse files
committed
fix: better log format
1 parent cf1f649 commit 5ebe5df

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor
22
test_config.yml
33
postgresql_exporter
4+
dist

Gopkg.lock

+38-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/ContaAzul/postgresql_exporter/gauges"
1111
"github.com/apex/httplog"
1212
"github.com/apex/log"
13-
"github.com/apex/log/handlers/text"
13+
"github.com/apex/log/handlers/logfmt"
1414
_ "github.com/lib/pq"
1515
"github.com/prometheus/client_golang/prometheus"
1616
"github.com/prometheus/client_golang/prometheus/promhttp"
@@ -26,7 +26,7 @@ var (
2626
)
2727

2828
func main() {
29-
log.SetHandler(text.Default)
29+
log.SetHandler(logfmt.Default)
3030
flag.Parse()
3131
var server = &http.Server{
3232
Addr: *addr,

0 commit comments

Comments
 (0)