Skip to content

Commit

Permalink
update implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-carlton committed Oct 27, 2024
1 parent df90ad4 commit 6b34eb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ var (

func init() {
traceLog = traceLogger()
fmt.Printf("created trace logger...\n%+v\n", traceLog)
sourcePathDepth = setSourcePathDepth()
logSource = setSource()
LogLevel = setLogLevel()
Expand Down Expand Up @@ -219,7 +220,7 @@ func traceLogger() *slog.Logger {
}

handler := slog.NewJSONHandler(os.Stdout, opts)

fmt.Printf("created trace handler...\n%+v\n", handler)
return slog.New(handler)
}

Expand Down Expand Up @@ -359,6 +360,7 @@ func CallerText(skip int) string {
// TraceCall traces calls and exit for functions.
func TraceCall() {
ctx := context.Background()
fmt.Printf("Called TraceCall\n")
traceLog.Log(ctx, LevelTrace, "Entering function")
}

Expand Down

0 comments on commit 6b34eb9

Please sign in to comment.