Skip to content
Snippets Groups Projects
  1. Oct 22, 2019
    • Nick Mathewson's avatar
      ac3136a6
    • Nick Mathewson's avatar
      Update tests to handle new interpretation of quiet_level. · 98c3b3bb
      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.
      98c3b3bb
    • Nick Mathewson's avatar
      Rationalize handling of quiet_level in config.c · e07b19d3
      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.
      e07b19d3
  2. Oct 17, 2019
  3. Oct 16, 2019
Loading