mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Restructure log initilization function to allow multiple backends without arguments.
This patch ensures that we more easily can extend our log backends that does not take any additional argument other than a single keyword. This patch is mostly reindentation of some code which is why it is split out into its own patch. See: https://bugs.torproject.org/24362
This commit is contained in:
parent
241b676638
commit
78a582ed88
@ -5732,8 +5732,8 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (smartlist_len(elts) == 1 &&
|
if (smartlist_len(elts) == 1) {
|
||||||
!strcasecmp(smartlist_get(elts,0), "syslog")) {
|
if (!strcasecmp(smartlist_get(elts,0), "syslog")) {
|
||||||
#ifdef HAVE_SYSLOG_H
|
#ifdef HAVE_SYSLOG_H
|
||||||
if (!validate_only) {
|
if (!validate_only) {
|
||||||
add_syslog_log(severity, options->SyslogIdentityTag);
|
add_syslog_log(severity, options->SyslogIdentityTag);
|
||||||
@ -5743,6 +5743,7 @@ options_init_logs(const or_options_t *old_options, or_options_t *options,
|
|||||||
#endif /* defined(HAVE_SYSLOG_H) */
|
#endif /* defined(HAVE_SYSLOG_H) */
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (smartlist_len(elts) == 2 &&
|
if (smartlist_len(elts) == 2 &&
|
||||||
!strcasecmp(smartlist_get(elts,0), "file")) {
|
!strcasecmp(smartlist_get(elts,0), "file")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user