class_docstr: Main logger
class_docstr_tok: ["Main","logger"]
code: def __init__(self, cfg: Any):
      self.loggers = {
          "local": LocalLogger(cfg),
          "external": Loggers.get(cfg.logging.logger),
      }
  
      try:
          self.loggers["external"] = self.loggers["external"](cfg)
      except Exception as e:
          logger.warning(
              f"Error when initializing logger. "
              f"Disabling custom logging functionality. "
              f"Please ensure logger configuration is correct and "
              f"you have a stable Internet connection: {e}"
          )
          self.loggers["external"] = DummyLogger(cfg)
  
imports: import dataclasses
  import logging
  import os
  from typing import Any, Dict, List, Optional
  import numpy
  from sqlitedict import SqliteDict
  from llm_studio.src.utils.plot_utils import PLOT_ENCODINGS
label_desc: Use image node_id 1 to create a new MainLogger object  with example: obj = MainLogger(cfg)