def METHOD_NAME(self, logging_callback: callable, message: dict):
    # Run callbacks on message
    if self.log:
        if self.message_count % 100 == 0:
            self.__file.close()
            self.__file = open(self.file_path, 'a')
        line = logging_callback(message)
        self.__file.write(line)