class_docstr: Logger for Ray Datasets which writes logs to a separate log file
  at `DatasetLogger.DEFAULT_DATASET_LOG_PATH`. Can optionally turn off
  logging to stdout to reduce clutter (but always logs to the aformentioned
  Datasets-specific log file).
  
  After initialization, always use the `get_logger()` method to correctly
  set whether to log to stdout. Example usage:
  ```
  logger = DatasetLogger(__name__)
  logger.get_logger().info("This logs to file and stdout")
  logger.get_logger(log_to_stdout=False).info("This logs to file only)
  logger.get_logger().warning("Can call the usual Logger methods")
  ```
docstr: Initialize DatasetLogger for a given `log_name`.
  
  Args:
      log_name: Name of logger (usually passed into `logging.getLogger(...)`)
docstr_tok: ["Initialize","DatasetLogger","for","a","given","`","log_name","`",".","Args",":","log_name",":","Name","of","logger","(","usually","passed","into","`","logging.getLogger","(","...",")","`",")"]
code: def __init__(self, log_name: str):
      """Initialize DatasetLogger for a given `log_name`.
  
      Args:
          log_name: Name of logger (usually passed into `logging.getLogger(...)`)
      """
      # Logger used to logging to log file (in addition to the root logger,
      # which logs to stdout as normal). For logging calls made with the
      # parameter `log_to_stdout = False`, `_logger.propagate` will be set
      # to `False` in order to prevent the root logger from writing the log
      # to stdout.
      self.log_name = log_name
      # Lazily initialized in self._initialize_logger()
      self._logger = None
  
file_path: ray/python/ray/data/_internal/dataset_logger.py
imports: import logging
  import os
  import ray
  from ray._private.ray_constants import LOGGER_FORMAT, LOGGER_LEVEL
label_desc: Use image node_id 1 to create a new DatasetLogger object  with example: obj = DatasetLogger(log_name)