8000 log: Improve server start error logging by VolodymyrBg · Pull Request #2359 · btcsuite/btcd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

log: Improve server start error logging #2359

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VolodymyrBg
Copy link

Change Description

Enhance error logging when server initialization fails by using more descriptive messages and splitting information across multiple log lines for better readability. This addresses a TODO comment in the code and makes troubleshooting easier for users when server startup fails.

Steps to Test

  1. Configure btcd with intentionally invalid listeners (e.g., an invalid IP address or port)
  2. Start btcd and observe the more detailed error messages in the logs
  3. Verify that the logs now show two separate error messages:
    • The first showing the server initialization error
    • The second showing which listeners failed

Pull Request Checklist

Testing

  • Your PR passes all CI checks.
  • Tests covering the positive and negative (error paths) are included.
  • Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

📝 Please see our Contribution Guidelines for further guidance.

Enhance error logging when server initialization fails by using more
descriptive messages and splitting information across multiple log lines
for better readability. This provides clearer context about what failed
and makes troubleshooting easier for users.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 14518658569

Details

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 11 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 56.604%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btcd.go 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
rpcclient/infrastructure.go 2 39.79%
txscript/taproot.go 2 95.98%
peer/peer.go 7 74.16%
Totals Coverage Status
Change from base Build 14316804349: -0.02%
Covered Lines: 31055
Relevant Lines: 54864

💛 - Coveralls

Copy link
Member
@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

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.

3 participants
0