clightning4j / btcli4j

It is a core lightning plugin to override Bitcoin backend plugin with esplora by Blockstream and give the possibility to make the running process with bitcoind in pruning mode more solid.
GNU General Public License v2.0
8 stars 7 forks source link

Ugly debug output #31

Closed jsarenik closed 3 years ago

jsarenik commented 3 years ago

Here is how the debug output looks like:

...
2021-03-30T18:26:05.793Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.794Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.795Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.795Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.796Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.796Z DEBUG   plugin-run-plugin.sh: ?O?f0\u001f\u0004\u0000\u0000\u0000\u0000\u0019v?\u0014t\u0014#?@???F??$3??<?B?????\u0007\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j???\u001e?\b\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j????\u000f\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j??\u0000\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001[?\u0014????\u000e?U?J?u\u0014\u0007=)??T7?w \u001ct??C?\u0000\u0000\u0000\u0000?H0E\u0002!\u0000?PT??rj?;?S\b??\u0006Q-\u000f9?W???!\u0016??\u0002 VU????\u0019?

The plugin is run via run-plugin.sh which does not need to be generated (will be in a PR at some point):

#!/bin/sh
a="/$0"; a=${a%/*}; a=${a:-.}; a=${a#/}/; BINDIR=$(cd $a; pwd)
java -jar $BINDIR/build/libs/btcli4j-all.jar

The second line is a POSIX shell-only dirname replacement.

vincenzopalazzo commented 3 years ago

Hi @jsarenik,

Thanks to test the plugin :-D, how it is going?

Ugly Ugly debug output

You have right :-) I will change the level of log in the next release. The log print the hex of the bock on the console, it help me to debug some stuff, but it is works I'm happy to remove it.

The plugin is run via run-plugin.sh which does not need to be generated (will be in a PR at some point):

I'm happy to receive your PR when you have time, the only "nit" it the java path, I preferer the absolute path of the version that gradle is using. I'm 5 different versions of JDK in my system that I managed via an export path, it is useful to have the absolute path and have also a generated version of the script. (In addition to yours)

The second line is a POSIX shell-only dirname replacement.

I will take a look later this night, thanks :)

jsarenik commented 3 years ago

I'm happy to receive your PR when you have time, the only "nit" it the java path, I preferer the absolute path of the version that gradle is using. I'm 5 different versions of JDK in my system that I managed via an export path, it is useful to have the absolute path and have also a generated version of the script. (In addition to yours)

@vincenzopalazzo I see your point. In that case let us just leave it as it is. The generated script works well and has the full path. Thanks for your previous comments.