Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger.WithValues() produces SEGV. #4

Open
jortel opened this issue Jun 28, 2024 · 0 comments
Open

Logger.WithValues() produces SEGV. #4

jortel opened this issue Jun 28, 2024 · 0 comments

Comments

@jortel
Copy link
Owner

jortel commented Jun 28, 2024

logger.WithValues() returns logger with Sink having a nil logger.

log = log.WithValues(
                "duration",
                settings.Duration,
                "kind",
                settings.Kind,
                "path",
                Settings.Path)

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x951537]

goroutine 1 [running]:
github.com/sirupsen/logrus.(*Logger).newEntry(0x0)
        /home/jortel/go/pkg/mod/github.com/sirupsen/[email protected]/logger.go:99 +0x17
github.com/sirupsen/logrus.(*Logger).WithFields(0x0, 0xc0007bea80)
        /home/jortel/go/pkg/mod/github.com/sirupsen/[email protected]/logger.go:124 +0x36
github.com/jortel/go-utils/logr.(*Sink).Info(0xc0007beab0, 0x1a2d5c0?, {0x1bb458a, 0x11}, {0x0?, 0x958dbd?, 0xc000153740?})
        /home/jortel/go/pkg/mod/github.com/jortel/[email protected]/logr/logger.go:74 +0x53
github.com/go-logr/logr.Logger.Info({{0x1e8cb28?, 0xc0007beab0?}, 0x9581b2?}, {0x1bb458a, 0x11}, {0x0, 0x0, 0x0})
        /home/jortel/go/pkg/mod/github.com/go-logr/[email protected]/logr.go:278 +0xf3
main.profiler()
        /home/jortel/go/src/github.com/konveyor/tackle2-hub/cmd/main.go:244 +0x353
main.main()
        /home/jortel/go/src/github.com/konveyor/tackle2-hub/cmd/main.go:102 +0x12a

Process finished with the exit code 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant