original_docstring: 
          Set up the logging formatting and files. The levels are defined in the dictionary mapping, and so new
          levels and their warning level should be defined there. Additional log files can be added in the
          log_handlers dictionary. In the other routines, the logger attribute should be used.
          
docstring: Set up the logging formatting and files. The levels are defined in the dictionary mapping, and so new
  levels and their warning level should be defined there. Additional log files can be added in the
  log_handlers dictionary. In the other routines, the logger attribute should be used.
docstring_tokens: Set up the logging formatting and files . The levels are defined in the dictionary mapping and so new levels and their warning level should be defined there . Additional log files can be added in the log_handlers dictionary . In the other routines the logger attribute should be used .
code: def _init_logging(self):
          """
          Set up the logging formatting and files. The levels are defined in the dictionary mapping, and so new
          levels and their warning level should be defined there. Additional log files can be added in the
          log_handlers dictionary. In the other routines, the logger attribute should be used.
          """
          mapping = {
              "debug": logging.DEBUG,
              "warning": logging.WARNING,
              "analysis": logging.INFO,
              "stream": logging.INFO,
          }
          logging.captureWarnings(True)
          self.logger = logging.getLogger(f"{self.session.experiment} log")
          self.logger.setLevel(logging.DEBUG)
          # Define file handlers for each type of log
          self.log_handlers = {
              "analysis": logging.FileHandler(
                  f"./logs/{self.session.experiment}-analysis.log", mode="w"
              ),
              "warning": logging.FileHandler(
                  f"./logs/{self.session.experiment}-warnings.log", mode="w"
              ),
              "debug": logging.FileHandler(
                  f"./logs/{self.session.experiment}-debug.log", mode="w"
              ),
          }
          # If verbose is specified, the logging info is directly printed as well
          if self.verbose is True:
              self.log_handlers["stream"] = logging.StreamHandler()
          # Set up the formatting and the level definitions
          for key, handler in self.log_handlers.items():
              handler.setFormatter(
                  logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
              )
              # do not redefine the default warning levels
              handler.setLevel(mapping[key])
              self.logger.addHandler(handler)
code_tokens: def _init_logging ( self ) : mapping = { "debug" : logging . DEBUG , "warning" : logging . WARNING , "analysis" : logging . INFO , "stream" : logging . INFO , } logging . captureWarnings ( True ) self . logger = logging . getLogger ( f"{self.session.experiment} log" ) self . logger . setLevel ( logging . DEBUG ) self . log_handlers = { "analysis" : logging . FileHandler ( f"./logs/{self.session.experiment}-analysis.log" , mode = "w" ) , "warning" : logging . FileHandler ( f"./logs/{self.session.experiment}-warnings.log" , mode = "w" ) , "debug" : logging . FileHandler ( f"./logs/{self.session.experiment}-debug.log" , mode = "w" ) , } if self . verbose is True : self . log_handlers [ "stream" ] = logging . StreamHandler ( ) for key , handler in self . log_handlers . items ( ) : handler . setFormatter ( logging . Formatter ( "%(asctime)s - %(levelname)s - %(message)s" ) ) handler . setLevel ( mapping [ key ] ) self . logger . addHandler ( handler )
short_docstring: Set up the logging formatting and files.
short_docstring_tokens: Set up the logging formatting and files .
comment: """
          Set up the logging formatting and files. The levels are defined in the dictionary mapping, and so new
          levels and their warning level should be defined there. Additional log files can be added in the
          log_handlers dictionary. In the other routines, the logger attribute should be used.
          """$SEP$# Define file handlers for each type of log$SEP$# If verbose is specified, the logging info is directly printed as well$SEP$# Set up the formatting and the level definitions$SEP$# do not redefine the default warning levels