[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #32036 [Core Tor/Tor]: output debug logs to logcat as early as possible on Android
#32036: output debug logs to logcat as early as possible on Android
---------------------------------+------------------------------
Reporter: eighthave | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Component: Core Tor/Tor
Version: | Severity: Normal
Keywords: tbb-mobile, Android | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------------+------------------------------
Now that I have a native ''TorService'' working on Android, I'm working on
creating an Android-native test suite for it. For some reason, it fails
to start there, but it fails quite early, so there is no way to get logs
out. `--Log debug android` is enabled after this issue.
I've gotten earlier log output to logcat by executing `add_android_log()`
at the beginning of `options_act_reversible()`. Ideally, there would be a
way to have this built in. On Android, there is no way to see ''stderr''
or ''stdout'' from C code executed via JNI. Only from Java code. Yes,
this is terrible design, but that's how it seems to be.
Here's one potential solution for redirecting stdout/stderr:
https://codelab.wordpress.com/2014/11/03/how-to-use-standard-output-
streams-for-logging-in-android-apps/ Just ignore the part about Android
being "basically a UNIX system" because Android is really not UNIX, its a
lot more different from UNIX than Windows. Like Windows, it has some
familiar UNIXish things.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32036>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs