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 66f7a68 commit ca32add
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func init() {
sourcePathDepth = setSourcePathDepth()
logSource = setSource()
LogLevel = setLogLevel()
fmt.Printf("Logging level: %d\n", LogLevel)
traceLog = traceLogger()
}

Expand Down Expand Up @@ -138,7 +137,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(MyCaller, false)
source := GetCaller(MyCallersCaller, false)
if sourcePathDepth >= 0 {
path := strings.Split(filepath.Dir(source.File), "/")
if len(path) < sourcePathDepth {
Expand Down

0 comments on commit ca32add

Please sign in to comment.