docs: def format(self, record):
          """Dump the record to JSON."""
          data = record.__dict__.copy()
  
          data['data_id'] = DATA['id']
          data['data_location_id'] = DATA_LOCATION['id']
          data['hostname'] = socket.gethostname()
  
          # Get relative path, so listener can reconstruct the path to the actual code.
          data['pathname'] = os.path.relpath(data['pathname'], os.path.dirname(__file__))
  
          # Exception and Traceback cannot be serialized.
          data['exc_info'] = None
  
          # Ensure logging message is instantiated to a string.
          data['msg'] = str(data['msg'])
  
          return json.dumps(data)