Skip to content

feat: save app and ldk logs to same file#713

Merged
ovitrif merged 1 commit intomasterfrom
claude/issue-655-20260122-1114
Jan 26, 2026
Merged

feat: save app and ldk logs to same file#713
ovitrif merged 1 commit intomasterfrom
claude/issue-655-20260122-1114

Conversation

@ovitrif
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif commented Jan 22, 2026

Closes #655

Summary

Both APP and LDK logs now write to the same file in chronological order.

Changes

  • Created shared LogSaver instance used by both APP and LDK loggers
  • Unified log file path: bitkit_<timestamp>.log
  • Logs automatically in chronological order due to shared file
  • File writes serialized via single-threaded coroutine queue
  • APP/LDK tag prefixes distinguish log sources

Preview

Testing

  1. Uninstal previous app, build & open app, reset & restore wallet
  2. Export logs via Settings > Advanced > Lightning Connections > "Export…" button
  3. Extract & open the most recent logs files in a text editor
  4. ✔️ Verify both app and ldk-node logs were recorded in chrono order

Or, as a dev just go to device explorer and the app's data folder and open that file in Android Studio to check.

ovitrif

This comment was marked as resolved.

@ovitrif ovitrif self-assigned this Jan 22, 2026
@claude

This comment has been minimized.

@ovitrif

This comment was marked as resolved.

@ovitrif ovitrif changed the title feat: merge app and ldk logs into unified file feat: save app and ldk logs to same file Jan 22, 2026
@claude

This comment has been minimized.

@ovitrif ovitrif changed the title feat: save app and ldk logs to same file feat: merge app and ldk logs into same file Jan 22, 2026
@ovitrif ovitrif changed the title feat: merge app and ldk logs into same file feat: save app and ldk logs to same file Jan 22, 2026
@ovitrif ovitrif marked this pull request as ready for review January 22, 2026 19:23
ovitrif

This comment was marked as resolved.

@ovitrif ovitrif enabled auto-merge January 22, 2026 19:25
@claude

This comment has been minimized.

@ovitrif ovitrif force-pushed the claude/issue-655-20260122-1114 branch 2 times, most recently from ed51c18 to bfa9a1f Compare January 22, 2026 20:58
@ovitrif ovitrif force-pushed the claude/issue-655-20260122-1114 branch from b4989ce to 778ca10 Compare January 22, 2026 21:46
Comment thread app/src/main/java/to/bitkit/utils/Logger.kt Outdated
Comment thread app/src/main/java/to/bitkit/utils/Logger.kt
@ovitrif

This comment was marked as resolved.

@claude

This comment has been minimized.

Comment thread app/src/main/java/to/bitkit/utils/Logger.kt Outdated
Comment thread app/src/main/java/to/bitkit/utils/Logger.kt
Comment thread app/src/main/java/to/bitkit/utils/Logger.kt
jvsena42

This comment was marked as resolved.

@ovitrif ovitrif disabled auto-merge January 23, 2026 21:42
@ovitrif ovitrif requested a review from jvsena42 January 23, 2026 21:42
@ovitrif

This comment was marked as resolved.

@ovitrif

This comment was marked as resolved.

@claude

This comment has been minimized.

@synonymdev synonymdev deleted a comment from claude Bot Jan 25, 2026
@ovitrif ovitrif force-pushed the claude/issue-655-20260122-1114 branch from 05776ee to 762b96a Compare January 25, 2026 15:24
jvsena42
jvsena42 previously approved these changes Jan 26, 2026
Copy link
Copy Markdown
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested

  • Reset and setup flow
  • Single log file creation

nit: could add a method in the future for wipe old log files

@jvsena42
Copy link
Copy Markdown
Member

@ovitrif there are unverified commits

@ovitrif ovitrif enabled auto-merge January 26, 2026 13:37
@ovitrif ovitrif disabled auto-merge January 26, 2026 13:37
@ovitrif ovitrif force-pushed the claude/issue-655-20260122-1114 branch from 762b96a to 8cfc501 Compare January 26, 2026 13:50
@ovitrif ovitrif requested a review from jvsena42 January 26, 2026 13:50
@ovitrif ovitrif enabled auto-merge January 26, 2026 13:56
@ovitrif
Copy link
Copy Markdown
Collaborator Author

ovitrif commented Jan 26, 2026

@ovitrif there are unverified commits

@jvsena42 should be ok now, pls review/approve.

fix: Squashed all commits

@ovitrif
Copy link
Copy Markdown
Collaborator Author

ovitrif commented Jan 26, 2026

Also added a change to claude workflow which is supposedly going to fix the signed commits issues

Copy link
Copy Markdown
Member

@jvsena42 jvsena42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Reset app
  • logs displayed on correct order
2026-01-26 11:21:18.911  8132-8257  APP                     to.bitkit.dev                        W  2026-01-26 14:21:18.911 WARN    [Logger.kt:60]                       Wiping entire logs directory… - Logger
2026-01-26 11:21:18.919  8132-8257  APP                     to.bitkit.dev                        I  2026-01-26 14:21:18.919 INFO    [Logger.kt:242]                      Log session initialized with file path: '/data/user/0/to.bitkit.dev/files/logs/bitkit_2026-01-26_14-21-18.log' - LogSaver
2026-01-26 11:21:18.920  8132-8257  APP                     to.bitkit.dev                        I  2026-01-26 14:21:18.920 VERBOSE [Logger.kt:249]                      Deleting old log files… - LogSaver

@ovitrif ovitrif merged commit 51dd03d into master Jan 26, 2026
12 of 13 checks passed
@ovitrif ovitrif deleted the claude/issue-655-20260122-1114 branch January 26, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge logs of app and ldk in same files, in chrono order

2 participants