class_docstr: Context manager that replaces the param logger and captures
  log messages in a StringIO stream.
class_docstr_tok: ["Context","manager","that","replaces","the","param","logger","and","captures","log","messages","in","a","StringIO","stream","."]
code: def __enter__(self):
      self.stream = StringIO()
      self._handler = logging.StreamHandler(self.stream)
      self._logger = logging.getLogger("testlogger")
      for handler in self._logger.handlers:
          self._logger.removeHandler(handler)
      self._logger.addHandler(self._handler)
      self._param_logger = param.parameterized.logger
      param.parameterized.logger = self._logger
      return self
  
imports: import logging
  from io import StringIO
  import param
label_desc: Use image node_id 1 for calling the ParamLogStream obj's underlying member method code with example usage: obj.__enter__() and returns: self