diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-12-11 13:12:25 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-12-11 13:22:39 +0000 |
commit | b0b8f7c30c8296344c77d06a24821f35b667e3dd (patch) | |
tree | ff08bbf8bf55a202760a61f197cf484c98875c63 /src/common/torlog.h | |
parent | 78a582ed880166a73be284ae799397e84fac36a3 (diff) | |
download | tor-b0b8f7c30c8296344c77d06a24821f35b667e3dd.tar.gz tor-b0b8f7c30c8296344c77d06a24821f35b667e3dd.zip |
Add support for Android's logging subsystem.
This patch adds support for Android's logging subsystem in Tor. When
debugging Android applications it is useful to be able to collect
information about the application running on the platform via the
various system services that is available on the platform.
This patch allows you to add "Log notice android" to your torrc and have
Tor send everything above and including the notice severity to Android's
ring buffer which can be inspected using the 'adb logcat' program.
See: https://bugs.torproject.org/24362
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r-- | src/common/torlog.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h index 65bf41702a..b7d033adb9 100644 --- a/src/common/torlog.h +++ b/src/common/torlog.h @@ -146,7 +146,11 @@ int add_file_log(const log_severity_list_t *severity, const char *filename, #ifdef HAVE_SYSLOG_H int add_syslog_log(const log_severity_list_t *severity, const char* syslog_identity_tag); -#endif +#endif // HAVE_SYSLOG_H. +#ifdef HAVE_ANDROID_LOG_H +int add_android_log(const log_severity_list_t *severity, + const char *android_identity_tag); +#endif // HAVE_ANDROID_LOG_H. int add_callback_log(const log_severity_list_t *severity, log_callback cb); void logs_set_domain_logging(int enabled); int get_min_log_level(void); |