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 f305e7d commit 78d0a40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
// MyCallersCallersCaller is the setting for the function that called the function that called the function that called the function calling MyCaller.
MyCallersCallersCaller = 6

twelve = 12
eleven = 11

stackDepth = 32

Expand Down Expand Up @@ -139,7 +139,7 @@ func setLogLevelName(a slog.Attr) slog.Attr {
// setCallerSourceName is used to set to source information to the caller of the function calling log.
func setCallerSourceName(a slog.Attr) slog.Attr {
if a.Key == slog.SourceKey { //nolint: nestif
source := GetCaller(twelve, false)
source := GetCaller(eleven, false)
if sourcePathDepth >= 0 {
path := strings.Split(filepath.Dir(source.File), "/")
if len(path) < sourcePathDepth {
Expand Down

0 comments on commit 78d0a40

Please sign in to comment.