From 1dee5dec55b928ecadb48f2a16760979c34cc0c2 Mon Sep 17 00:00:00 2001 From: Asara Date: Mon, 23 Sep 2024 20:34:53 -0400 Subject: [PATCH] update gologger --- go.mod | 2 +- go.sum | 4 ++-- vendor/git.devvul.com/asara/gologger/gologger.go | 9 +++++++++ vendor/modules.txt | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 495d980..143c8a2 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 123a85a..793f4f5 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/git.devvul.com/asara/gologger/gologger.go b/vendor/git.devvul.com/asara/gologger/gologger.go index b1fee6f..db0876c 100644 --- a/vendor/git.devvul.com/asara/gologger/gologger.go +++ b/vendor/git.devvul.com/asara/gologger/gologger.go @@ -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 { diff --git a/vendor/modules.txt b/vendor/modules.txt index be44734..ddfc179 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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