- Oct 22, 2019
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Two things needed to be changed. First, we used to set quiet_level to the default (QUIET_NONE) when running tests, since we would not call anything that acted based upon it. But since we sometimes call options_init_logs(), we need to pre-set quiet_level to QUIET_SILENT in the logs so that we don't add the default logs. This did not cause test failure: just unwanted logs. Second, we had a test that checked whether options_validate was messing with options->Logs correctly. Since options_validate no longer messes with the logs, we no longer want a test for this.
-
Nick Mathewson authored
Formerly, we would use quiet_level as an excuse to rewrite the log configuration, adding a default log line if none existed, and if RunAsDaemon was not set, and if we were not being invoked via setconf (!). This is against our best practices for several reasons: * We should not be changing configured options except when the user tells us to do so. * We should especially not be changing options in the options_validate function. * Distinguishing whether we are being called from setconf adds a risky special-case. Instead, this patch take a simpler approach: it changes the interpretation of having no logging lines set to mean: If there is a stdout, add a default log based on quiet_level. Solves ticket 31999.
-
- Oct 17, 2019
-
-
Nick Mathewson authored
I'm about to unify the code for handling this between main.c and config.c.
-
Nick Mathewson authored
We used to have this function so that we could mark our initial log-to-stdout as specifically temporary so that we would delete it once regular logs were configured. But it's no longer necessary to mark these logs as temporary, since we now use a mark-and-sweep process to ensure that _all_ not-configured logs are closed when we change our configuration. Instead, this function will be the basis of a refactoring in how we handle default logs.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Fix a spelling error.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Previously this was done with a big list of options in main.c which implied "hush" or "quiet". One of these options ("--digests") no longer existed, but we still checked for it. Now we use the table of command-line-only arguments to set this value.
-
Nick Mathewson authored
Previously these were implemented with a search in options_init_from_torrc(), but that led to each option being declared more than needed: once to say that it was a valid option, and once to say what it meant.
-
Nick Mathewson authored
Previously it was stored in two outvars, but this is more elegant. I'm going to be expanding this struct in later commits.
-
Nick Mathewson authored
-
Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
-
Nick Mathewson authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
-
teor authored
Obviously correct fixes to code that's already been reviewed.
-
- Oct 16, 2019
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
These need to start with /**, not /*.
-
Nick Mathewson authored
-
Nick Mathewson authored
These are yet more that were not made with "/**"
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-