aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-09-23 12:30:24 -0400
committerNick Mathewson <nickm@torproject.org>2020-09-23 12:33:58 -0400
commit5c9b4a00608b89892fc48a1a76e5d4b52a237b55 (patch)
treece3864224baed98e3bdc6f9acec3a37a8753d25d /src/app
parent10e40ca1de34d0e0611d510f913ff4f181e04c10 (diff)
downloadtor-5c9b4a00608b89892fc48a1a76e5d4b52a237b55.tar.gz
tor-5c9b4a00608b89892fc48a1a76e5d4b52a237b55.zip
Remove support for old android "logcat" API
This is apparently obsolete; syslog is modern instead. If users have an android log configured, given them a syslog if we can. Closes #32181.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c16
-rw-r--r--src/app/config/or_options_st.h1
2 files changed, 10 insertions, 7 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 5c8a3792ee..a26bebe8b1 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -548,7 +548,7 @@ static const config_var_t option_vars_[] = {
V(LogTimeGranularity, MSEC_INTERVAL, "1 second"),
V(TruncateLogFile, BOOL, "0"),
V_IMMUTABLE(SyslogIdentityTag, STRING, NULL),
- V_IMMUTABLE(AndroidIdentityTag,STRING, NULL),
+ OBSOLETE("AndroidIdentityTag"),
V(LongLivedPorts, CSV,
"21,22,706,1863,5050,5190,5222,5223,6523,6667,6697,8300"),
VAR("MapAddress", LINELIST, AddressMap, NULL),
@@ -4934,15 +4934,19 @@ options_init_logs(const or_options_t *old_options, const or_options_t *options,
goto cleanup;
}
+ /* We added this workaround in 0.4.5.x; we can remove it in 0.4.6 or
+ * later */
if (!strcasecmp(smartlist_get(elts, 0), "android")) {
-#ifdef HAVE_ANDROID_LOG_H
+#ifdef HAVE_SYSLOG_H
+ log_warn(LD_CONFIG, "The android logging API is no longer supported;"
+ " adding a syslog instead. The 'android' logging "
+ " type will no longer work in the future.");
if (!validate_only) {
- add_android_log(severity, options->AndroidIdentityTag);
+ add_syslog_log(severity, options->SyslogIdentityTag);
}
#else
- log_warn(LD_CONFIG, "Android logging is not supported"
- " on this system. Sorry.");
-#endif /* defined(HAVE_ANDROID_LOG_H) */
+ log_warn(LD_CONFIG, "The android logging API is no longer supported.");
+#endif
goto cleanup;
}
}
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 3b84e5e1f2..6201b6df40 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -58,7 +58,6 @@ struct or_options_t {
int TruncateLogFile; /**< Boolean: Should we truncate the log file
before we start writing? */
char *SyslogIdentityTag; /**< Identity tag to add for syslog logging. */
- char *AndroidIdentityTag; /**< Identity tag to add for Android logging. */
char *DebugLogFile; /**< Where to send verbose log messages. */
char *DataDirectory_option; /**< Where to store long-term data, as