class_docstr: Allows to redirect stdout and stderr to logger.
  
  :param log: The log level method to write to, ie. log.debug, log.warning
class_docstr_tok: ["Allows","to","redirect","stdout","and","stderr","to","logger",".",":","param","log",":","The","log","level","method","to","write","to",",","ie",".","log.debug",",","log.warning"]
docstr: Do whatever it takes to actually log the specified logging record.
  
  :param message: message to log
docstr_tok: ["Do","whatever","it","takes","to","actually","log","the","specified","logging","record",".",":","param","message",":","message","to","log"]
code: def write(self, message):
      """
      Do whatever it takes to actually log the specified logging record.
  
      :param message: message to log
      """
      if not message.endswith("\n"):
          self._buffer += message
      else:
          self._buffer += message.rstrip()
          self.flush()
  
imports: from __future__ import annotations
  import abc
  import enum
  import logging
  import sys
  from io import IOBase
  from logging import Handler, StreamHandler
  from typing import IO, TYPE_CHECKING, Any, Optional, TypeVar, cast
  import re2
label_desc: Use image node_id 5 for calling the StreamLogWriter obj's underlying member method code with example usage: obj.write(message) without return types