Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
deBeauvoir
samourai-wallet-android
Commits
9151a2ca
Commit
9151a2ca
authored
Jan 03, 2022
by
zeroleak
Browse files
debug complete whirlpool information on Logcat
parent
eba2e896
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
app/src/main/java/com/samourai/wallet/settings/SettingsDetailsFragment.kt
...a/com/samourai/wallet/settings/SettingsDetailsFragment.kt
+5
-0
app/src/main/java/com/samourai/wallet/util/LogUtil.java
app/src/main/java/com/samourai/wallet/util/LogUtil.java
+14
-0
No files found.
app/src/main/java/com/samourai/wallet/settings/SettingsDetailsFragment.kt
View file @
9151a2ca
...
...
@@ -10,6 +10,7 @@ import android.os.Looper
import
android.text.Editable
import
android.text.InputType
import
android.text.TextWatcher
import
android.util.Log
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
...
...
@@ -693,6 +694,8 @@ class SettingsDetailsFragment(private val key: String?) : PreferenceFragmentComp
.
setCancelable
(
false
)
.
setPositiveButton
(
R
.
string
.
ok
)
{
dialog
,
whichButton
->
dialog
.
dismiss
()
}
.
show
()
LogUtil
.
debugLarge
(
"Settings"
,
"# INDEXES DEBUG #\n"
+
builder
.
toString
());
}
private
fun
doAddressCalc
()
{
...
...
@@ -823,6 +826,8 @@ class SettingsDetailsFragment(private val key: String?) : PreferenceFragmentComp
.
setCancelable
(
false
)
.
setPositiveButton
(
R
.
string
.
ok
)
{
dialog
,
whichButton
->
dialog
.
dismiss
()
}
.
show
()
LogUtil
.
debugLarge
(
"Settings"
,
"# WHIRLPOOL DEBUG #\n"
+
builder
.
toString
());
}
private
fun
doBroadcastHex
()
{
...
...
app/src/main/java/com/samourai/wallet/util/LogUtil.java
View file @
9151a2ca
...
...
@@ -62,4 +62,18 @@ public class LogUtil {
Log
.
d
(
"LogUtil"
,
"Debug logs enabled"
);
}
/**
* Debug large strings to avoid log truncation.
* @param tag
* @param content
*/
public
static
void
debugLarge
(
String
tag
,
String
content
)
{
if
(
content
.
length
()
>
4000
)
{
Log
.
d
(
tag
,
content
.
substring
(
0
,
4000
));
debugLarge
(
tag
,
content
.
substring
(
4000
));
}
else
{
Log
.
d
(
tag
,
content
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment