-
Notifications
You must be signed in to change notification settings - Fork 912
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
plugin-bcli returning "\n" instead of line break in the logfile #4912
Comments
This occurs for all plugins. Is it really that much of a concern? |
Not important I think because the console should be formatted fine (?). However, maybe on the file, we can make some trick to split the string by "\n" token to make easy the human parsing of the file? |
Seems a an easy thing to do, probably should hook somewhere in |
This is just a little inconvenient. I can understand the information perfectly. |
@ZmnSCPxj I can make some experiments later this week, and report there the result.
BTW, we can try to improve this error message, thanks to report this |
Double escape node alias in the log, to print weird node alias in escaped form. Fix ElementsProject#4912
Hello! @starius submitted PR #7013 for this issue which was posted as a bounty: https://community.sphinx.chat/bounty/1214 Would it be okay to assign him the issue and review his pr? |
Previously, the code utilized JSON-encoded text to pass log messages to the log_() function, resulting in new lines being printed to the log as '\n'. This commit addresses this issue by unescaping and splitting the log message into lines, with each non-empty line being logged separately. It is deemed acceptable to pass non-printable characters to log_() since they are replaced with "?" in the logv() function, invoked by log_(). Therefore, leaving lines JSON unescaped is permissible. It's important to note that only the last log_() call may have call_notifier set to true. This adjustment is crucial to prevent Python tracebacks complaining about a broken pipe after lightningd exits. Fix ElementsProject#4912 For reference, the log of lightningd failing without a backend: ./lightningd/lightningd 2024-02-08T20:33:17.642Z INFO lightningd: v23.11-257-g968d6d6-modded Could not connect to bitcoind using bitcoin-cli. Is bitcoind running? Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind. You can verify that your Bitcoin Core installation is ready for use by running: $ bitcoin-cli echo 'hello world' 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: Could not connect to bitcoind using bitcoin-cli. Is bitcoind running? 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind. 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: You can verify that your Bitcoin Core installation is ready for use by running: 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: $ bitcoin-cli echo 'hello world' 2024-02-08T20:33:18.227Z INFO plugin-bcli: Killing plugin: exited before we sent init The Bitcoin backend died.
Previously, the code utilized JSON-encoded text to pass log messages to the log_() function, resulting in new lines being printed to the log as '\n'. This commit addresses this issue by unescaping and splitting the log message into lines, with each non-empty line being logged separately. It is deemed acceptable to pass non-printable characters to log_() since they are replaced with "?" in the logv() function, invoked by log_(). Therefore, leaving lines JSON unescaped is permissible. It's important to note that only the last log_() call may have call_notifier set to true. This adjustment is crucial to prevent Python tracebacks complaining about a broken pipe after lightningd exits. Fix ElementsProject#4912 For reference, the log of lightningd failing without a backend: ./lightningd/lightningd 2024-02-08T20:33:17.642Z INFO lightningd: v23.11-257-g968d6d6-modded Could not connect to bitcoind using bitcoin-cli. Is bitcoind running? Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind. You can verify that your Bitcoin Core installation is ready for use by running: $ bitcoin-cli echo 'hello world' 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: Could not connect to bitcoind using bitcoin-cli. Is bitcoind running? 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind. 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: You can verify that your Bitcoin Core installation is ready for use by running: 2024-02-08T20:33:18.227Z **BROKEN** plugin-bcli: $ bitcoin-cli echo 'hello world' 2024-02-08T20:33:18.227Z INFO plugin-bcli: Killing plugin: exited before we sent init The Bitcoin backend died.
v0.10.2
Steps to Reproduce
bitcoind process got killed with lightningd running
lightning logfile output
The text was updated successfully, but these errors were encountered: