-debuglogfile=0 does not disable logging to a file #14064

issue takinbo opened this issue on August 25, 2018
  1. takinbo commented at 11:04 PM on August 25, 2018: contributor

    The documentation for the -debuglogfile option says you can disable logging to a file by setting the value to 0; this does not appear to be the case. Instead a file named 0 is created and used as the log file.

    The expectation is that when you run bitcoind -debuglogfile=0 that no logging is made to a file.

    This affects the latest version v0.17.0rc2

  2. fanquake added the label Utils/log/libs on Aug 25, 2018
  3. MarcoFalke added this to the milestone 0.17.0 on Aug 26, 2018
  4. MarcoFalke commented at 1:25 PM on August 26, 2018: member

    If this is documented that way, we should add a functional test case

  5. laanwj commented at 10:29 AM on August 27, 2018: member

    Thanks for testing this.

    This means that -nodebuglogfile also doesn't work as -noX effectively sets X=0. What is the way then to not log to a file anymore? I think this worked at some point.

  6. laanwj commented at 10:32 AM on August 27, 2018: member

    Yep, can reproduce this;

    $ rm -rf $HOME/.bitcoin/regtest
    $ src/bitcoind -regtest -debuglogfile=0
    <CTRL-C>
    $ stat $HOME/.bitcoin/regtest/0
      File: /home/orion/.bitcoin/regtest/0
    ...
    

    -nodebuglogfile, curiously enough, does work:

    $ rm -rf $HOME/.bitcoin/regtest
    $ src/bitcoind -regtest -nodebuglogfile
    <CTRL-C>
    $ stat ~/.bitcoin/regtest/0
    stat: cannot stat '/home/orion/.bitcoin/regtest/0': No such file or directory
    
  7. AkioNak commented at 11:04 AM on August 27, 2018: contributor

    I think #12713 has changed how to disable non boolean options like -debuglogfile. May be fixing the document is better.

    "-nodebuglogfile" is checked by feature_logging.py. https://github.com/bitcoin/bitcoin/blob/master/test/functional/feature_logging.py#L62-L67

  8. laanwj commented at 9:21 PM on August 28, 2018: member

    At least that would be easiest, though we'd have to check the rest of the documentation for =0 for non-boolean options as well then.

  9. laanwj referenced this in commit 728e8c4dde on Aug 29, 2018
  10. laanwj cross-referenced this on Aug 29, 2018 from issue doc: Change documentation for =0 for non-boolean options by laanwj
  11. laanwj referenced this in commit 2739cff13a on Aug 29, 2018
  12. laanwj commented at 9:42 AM on August 29, 2018: member

    see #14100: I think I made the documentation consistent there, getting rid of =0 in favor of -no... for non-boolean options even if still accepted for backwards compatibility

  13. laanwj referenced this in commit 9e7ddf97d5 on Aug 29, 2018
  14. laanwj referenced this in commit e9a78e9b3b on Sep 5, 2018
  15. MarcoFalke referenced this in commit 95d731d9b3 on Sep 5, 2018
  16. MarcoFalke referenced this in commit 2936dbc557 on Sep 5, 2018
  17. laanwj commented at 12:49 PM on September 6, 2018: member

    Closing, this has been documented in #14100, which is merged and backported.

  18. laanwj closed this on Sep 6, 2018

  19. HashUnlimited referenced this in commit 2d0f2e338f on Sep 14, 2018
  20. HashUnlimited cross-referenced this on Sep 14, 2018 from issue doc: Change documentation for =0 for non-boolean options by HashUnlimited
  21. uhliksk referenced this in commit da0356d1ef on Oct 18, 2018
  22. jfhk referenced this in commit 3765cd7fff on Nov 14, 2018
  23. HashUnlimited referenced this in commit d91956abc4 on Nov 26, 2018
  24. decryp2kanon cross-referenced this on Apr 18, 2020 from issue reduce filesize debug.log by decryp2kanon
  25. Munkybooty referenced this in commit 492bc9374c on Jul 1, 2021
  26. Munkybooty referenced this in commit e07f2cf0fd on Jul 1, 2021
  27. Munkybooty referenced this in commit 9b3d0a2c97 on Jul 2, 2021
  28. Munkybooty referenced this in commit 44b6238ddb on Jul 3, 2021
  29. UdjinM6 referenced this in commit fe87c21bf2 on Jul 3, 2021
  30. Munkybooty referenced this in commit a7f6bc83c5 on Jul 3, 2021
  31. UdjinM6 referenced this in commit 76378771c5 on Jul 3, 2021
  32. Munkybooty referenced this in commit 13eb54157c on Jul 7, 2021
  33. Munkybooty referenced this in commit 7405b236e2 on Jul 8, 2021
  34. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC