Skip to content

collectors: initialize logging before constructing collectors#130

Closed
djkazic wants to merge 1 commit into
masterfrom
fix-channelscollector-nil-pointer-deref
Closed

collectors: initialize logging before constructing collectors#130
djkazic wants to merge 1 commit into
masterfrom
fix-channelscollector-nil-pointer-deref

Conversation

@djkazic

@djkazic djkazic commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #129.

@ZZiigguurraatt

Copy link
Copy Markdown
Contributor

have another fix I'm working on that might be more comprehensive

@ZZiigguurraatt

Copy link
Copy Markdown
Contributor

have another fix I'm working on that might be more comprehensive

#131

Comment thread collectors/log.go
// Logger for lndmon's main process.
Logger btclog.Logger
// Logger for lndmon's main process. It defaults to a disabled logger
// so that it is safe to use before initLogRotator has been called

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this cause messages to be missed if the logger never successfully is able to open the log file?

@ZZiigguurraatt ZZiigguurraatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@djkazic djkazic closed this Jun 30, 2026
@djkazic djkazic deleted the fix-channelscollector-nil-pointer-deref branch July 7, 2026 14:48
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

Successfully merging this pull request may close these issues.

Panic: nil pointer deref in ChannelsCollector cache-refresh goroutine when Logger is uninitialized

2 participants