code: def test_log_filter_exception(caplog):
      """FieldSkipLogFilter handles exceptions from log.exception()."""
      logger = logging.getLogger()
      with LogFiltering(logger, FieldSkipLogFilter()):
          logger.exception(ValueError("Oh no"))
  
      assert len(caplog.records) == 1
      assert caplog.records[0].getMessage() == "Oh no"
  
file_path: Fiona/tests/test_logutils.py
imports: import logging
  import os
  import fiona
  from fiona.logutils import LogFiltering, FieldSkipLogFilter
label_desc: Use image node_id 4 for calling a global function with example usage: test_log_filter_exception(caplog) without return types