update gologger

This commit is contained in:
Amarpreet Minhas 2024-09-23 20:34:53 -04:00
parent 0f5042a5e6
commit 1dee5dec55
4 changed files with 13 additions and 4 deletions

2
go.mod
View file

@ -3,7 +3,7 @@ module git.devvul.com/asara/well-goknown
go 1.23.1
require (
git.devvul.com/asara/gologger v0.8.0
git.devvul.com/asara/gologger v0.9.0
github.com/fiatjaf/eventstore v0.9.1
github.com/fiatjaf/khatru v0.8.1
github.com/jmoiron/sqlx v1.4.0

4
go.sum
View file

@ -1,7 +1,7 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.devvul.com/asara/gologger v0.8.0 h1:UsBgNr1ZNpDVqVMTNy3KzSV1afqP0vmTiZvKXZ4YoGk=
git.devvul.com/asara/gologger v0.8.0/go.mod h1:APr1DdVYByFfPUGHqHtRMhxphQbj92/vT/t0iM40H/0=
git.devvul.com/asara/gologger v0.9.0 h1:gijJpkPjvzI5S/dmAXgYoKJbp5uuaETAOBYWo7bJg6U=
git.devvul.com/asara/gologger v0.9.0/go.mod h1:APr1DdVYByFfPUGHqHtRMhxphQbj92/vT/t0iM40H/0=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ=

View file

@ -1,8 +1,11 @@
package gologger
import (
"fmt"
"io"
"os"
"runtime"
"strings"
"sync"
"time"
@ -20,6 +23,12 @@ func Get(l string) zerolog.Logger {
var output io.Writer = zerolog.ConsoleWriter{
Out: os.Stdout,
TimeFormat: time.RFC3339,
FormatCaller: func(i interface{}) string {
_, vpath, _, _ := runtime.Caller(0)
bpath, _, _ := strings.Cut(vpath, "vendor/")
_, ret, _ := strings.Cut(fmt.Sprintf("%s", i), bpath)
return ret
},
}
level, err := zerolog.ParseLevel(l)
if err != nil {

2
vendor/modules.txt vendored
View file

@ -1,4 +1,4 @@
# git.devvul.com/asara/gologger v0.8.0
# git.devvul.com/asara/gologger v0.9.0
## explicit; go 1.22.5
git.devvul.com/asara/gologger
# github.com/andybalholm/brotli v1.0.5