class_docstr: JSON file logger.
  
  Args:
      path (str): path to write logs to
      steps_before_flushing: (int, optional): Number of steps to store in log before flushing
      log_all_ranks: (bool, optional): Log all ranks if true, else log only on rank 0.
class_docstr_tok: ["JSON","file","logger",".","Args",":","path","(","str",")",":","path","to","write","logs","to","steps_before_flushing",":","(","int",",","optional",")",":","Number","of","steps","to","store","in","log","before","flushing","log_all_ranks",":","(","bool",",","optional",")",":","Log","all","ranks","if","true",",","else","log","only","on","rank","0","."]
code: def __init__(
      self,
      path: str,
      steps_before_flushing: int = 100,
      log_all_ranks: bool = False,
  ) -> None:
      super().__init__(path, steps_before_flushing, log_all_ranks)
  
file_path: tnt/torchtnt/utils/loggers/json.py
imports: import json
  import logging
  from fsspec import open
  from torchtnt.utils.loggers.file import FileLogger
  from torchtnt.utils.loggers.logger import MetricLogger
label_desc: Use image node_id 1 to create a new JSONLogger object from inherited base classes: FileLogger, MetricLogger with example: obj = JSONLogger(path, steps_before_flushing, log_all_ranks)