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

issue takinbo openend 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;

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

    -nodebuglogfile, curiously enough, does work:

    0$ rm -rf $HOME/.bitcoin/regtest
    1$ src/bitcoind -regtest -nodebuglogfile
    2<CTRL-C>
    3$ stat ~/.bitcoin/regtest/0
    4stat: 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 referenced this in commit 2739cff13a on Aug 29, 2018
  11. 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
  12. laanwj referenced this in commit 9e7ddf97d5 on Aug 29, 2018
  13. laanwj referenced this in commit e9a78e9b3b on Sep 5, 2018
  14. MarcoFalke referenced this in commit 95d731d9b3 on Sep 5, 2018
  15. MarcoFalke referenced this in commit 2936dbc557 on Sep 5, 2018
  16. laanwj commented at 12:49 pm on September 6, 2018: member
    Closing, this has been documented in #14100, which is merged and backported.
  17. laanwj closed this on Sep 6, 2018

  18. HashUnlimited referenced this in commit 2d0f2e338f on Sep 14, 2018
  19. uhliksk referenced this in commit da0356d1ef on Oct 18, 2018
  20. jfhk referenced this in commit 3765cd7fff on Nov 14, 2018
  21. HashUnlimited referenced this in commit d91956abc4 on Nov 26, 2018
  22. Munkybooty referenced this in commit 492bc9374c on Jul 1, 2021
  23. Munkybooty referenced this in commit e07f2cf0fd on Jul 1, 2021
  24. Munkybooty referenced this in commit 9b3d0a2c97 on Jul 2, 2021
  25. Munkybooty referenced this in commit 44b6238ddb on Jul 3, 2021
  26. UdjinM6 referenced this in commit fe87c21bf2 on Jul 3, 2021
  27. Munkybooty referenced this in commit a7f6bc83c5 on Jul 3, 2021
  28. UdjinM6 referenced this in commit 76378771c5 on Jul 3, 2021
  29. Munkybooty referenced this in commit 13eb54157c on Jul 7, 2021
  30. Munkybooty referenced this in commit 7405b236e2 on Jul 8, 2021
  31. DrahtBot 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: 2024-12-19 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me