Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Add debug flag equivalent#23

Merged
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
wszdexdrf:debug
Jun 22, 2022
Merged

Add debug flag equivalent#23
danielabrozzoni merged 1 commit intobitcoindevkit:masterfrom
wszdexdrf:debug

Conversation

@wszdexdrf
Copy link
Copy Markdown
Contributor

This adds a function set_debug which will lower log levels to DEBUG so that more messages are logged.

src/interface.rs Outdated
/// Set logging level
/// # Arguments
/// * `debug` - Print debug statements if true.
pub fn set_debug(debug: bool) -> Result<(), Error> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we could instead have a set_log_level, so that the users can set their preferred log level (warn, debug, info, error...)

@wszdexdrf wszdexdrf force-pushed the debug branch 5 times, most recently from 4090bdc to 856ed48 Compare June 22, 2022 07:00
@danielabrozzoni
Copy link
Copy Markdown
Member

Can you change 856ed48's message? You're adding a function for setting the logging level

@danielabrozzoni danielabrozzoni mentioned this pull request Jun 22, 2022
12 tasks
Also adds a test for setting log level to DEBUG
@danielabrozzoni
Copy link
Copy Markdown
Member

ACK b58cf80

@danielabrozzoni danielabrozzoni merged commit 52e09a3 into bitcoindevkit:master Jun 22, 2022
@wszdexdrf wszdexdrf deleted the debug branch June 26, 2022 05:08
binary-hunter347iu added a commit to binary-hunter347iu/rust-hwi that referenced this pull request Sep 28, 2025
b58cf80b7b3dc4d7e86acd04e40fde90a284348f Add function for setting log level (wszdexdrf)

Pull request description:

  This adds a function set_debug which will lower log levels to DEBUG so that more messages are logged.

ACKs for top commit:
  danielabrozzoni:
    ACK b58cf80b7b3dc4d7e86acd04e40fde90a284348f

Tree-SHA512: a3c1700a540a8014b291a00f3171e14be11f25f0bf62e368ef9fabb2898a62784e69fbc03b4264720797832ffe09365f204d58439ba32549889f10ac830b6b05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants