1. 16 5月, 2018 14 次提交
  2. 15 5月, 2018 5 次提交
  3. 14 5月, 2018 18 次提交
  4. 13 5月, 2018 1 次提交
  5. 12 5月, 2018 2 次提交
    • D
      log: update docs for daemons to improve user understanding · 8ccee910
      Daniel P. Berrangé 提交于
      Strongly recommend against use of the log_levels setting since it
      creates overly verbose logs and has a serious performance impact.
      
      Describe the log filter syntax better and mention use of shell
      glob syntax. Also provide more realistic example of good settings
      to use. The libvirtd example is biased towards QEMU, but when the
      drivers split off each daemon can get its own more appropriate
      example.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      8ccee910
    • D
      log: support logging using shell wildcard syntax · cbb0fd3c
      Daniel P. Berrangé 提交于
      Rather than specialcasing handling of the '*' character, use fnmatch()
      to get normal shell wildcard syntax, as described in 'man glob(7)'.
      
      To get an indication of the performance impact of using globs instead
      of plain string matches, a test program was written. The list of all
      260 log categories was extracted from the source. Then a typical log
      filters setup was picked by creating an array of the strings "qemu",
      "security", "util", "cgroup", "event", "object". Every filter string
      was matched against every log category. Timing information showed that
      using strstr() this took 8 microseconds, while fnmatch() took 114
      microseconds.
      
      IOW, fnmatch is 14 times slower than our existing strstr check. These
      numbers show a worst case scenario that will never be hit, because it
      is rare that every log category would have data output. The log category
      matches are cached, so each category is only checked once no matter how
      many log statements are emitted. IOW despite being slower, this will
      be lost in the noise and have no consequence on real world logging
      performance.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      cbb0fd3c