code: def get_log_dir(self, conf_file):
          
          log_dir = None
  
          with open(conf_file, 'r') as conf_f:
              for line in conf_f:
                  line = line.split('#')[0].strip()
  
                  try:
                      (key, value) = line.split('=', 1)
                      if key.strip() == 'log-dir':
                          log_dir = value.strip()
                  except ValueError:
                      pass
  
          return log_dir
docs: Get watchdog log directory.
  
              Get watchdog log directory path configured in ``conf_file``.
  
              :returns: The watchdog log directory path.
              :returntype: str.
              :raises: IOError if ``conf_file`` is not readable.