Skip to content
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

Refactor: Use PacketLogFile for logging sent and received packets #1545

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesarich
Copy link
Contributor

@jamesarich jamesarich commented Jan 13, 2025

This replaces the (unused) BinaryLogFile with PacketLogFile for logging sent and received packets.

  • enables logging only for debug builds
  • packets are parsed from bytes -> protos -> json
  • adds timestamps to log entries
  • adds logging started/ended entries for delineating separate app runs
  • separate files for sent/received - sent_packets.log and received_packets.log
  • log files are stored in app ExternalFilesDirectory and accessible with Device Explorer or similar tools
    • on emulator:
      • /storage/emulated/0/Android/data/com.geeksville.mesh
    • on phone/sdcard:
      • /sdcard/Android/data/com.geeksville.mesh

requested by @thebentern

This commit replaces BinaryLogFile with PacketLogFile for logging sent and received packets. It also enables logging only in debug builds and adds timestamps to log entries, making it easier to debug and analyze packet data.
@jamesarich
Copy link
Contributor Author

@thebentern when you have a moment - check out the fdroid artifact off the ci run.

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.

1 participant