Skip to content

Commit

Permalink
asdl;
Browse files Browse the repository at this point in the history
  • Loading branch information
ef0xa committed Feb 9, 2024
1 parent 18847f6 commit 11ef58f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 3 additions & 4 deletions cmd/buildmeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ func main() {
package main
import "github.com/runpod/rplog"
import "github.com/google/uuid"
var metadata rplog.Metadata
func init() {
var metadata rplog.Metadata = func() rplog.Metadata {
id, err := uuid.NewV7()
if err != nil {
id = uuid.New()
}
metadata = rplog.Metadata{
return rplog.Metadata{
InstanceID: id.String(),
Service: %q,
Env: %q,
Expand All @@ -123,7 +122,7 @@ func init() {
VCSTime: %q,
VCSName: %q,
}
}
}()
`, o.Service, o.Env, o.VCSCommit, o.VCSTag, o.VCSTime, o.VCSName)

case "rust", "rs":
Expand Down
6 changes: 0 additions & 6 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"log/slog"
"runtime"
"runtime/debug"
"sync"
"time"

"github.com/runpod/rplog/trace"
Expand All @@ -21,11 +20,6 @@ type Handler struct {
slog.Handler
}

var (
once sync.Once // guards initialization of the logger
logger *slog.Logger // cached logger instance. this is usually synonymous with slog.Default, but we cache it here to avoid the overhead of calling slog.Default repeatedly.
)

// see buildmeta.go for the definition of Metadata
type Metadata struct {
InstanceID, Service, Env string
Expand Down

0 comments on commit 11ef58f

Please sign in to comment.