<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_logging( log_dir=tempfile.gettempdir(), format="[%(asctime)s][%(levelname)s] %(name)s:%(lineno)s - %(message)s", level=logging.INFO, ):
 """Configures logging to output to the provided log_dir. Will use a nested directory whose name is the current timestamp. :param log_dir: The directory to store logs in. :type log_dir: str :param format: The logging format string to use. :type format: str :param level: The logging level to use, e.g., logging.INFO. """


    if not Meta.log_path:
        # Generate a new directory using the log_dir, if it doesn't exist
        dt = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
        log_path = os.path.join(log_dir, dt)
        if not os.path.exists(log_path):
            os.makedirs(log_path)

        # Configure the logger using the provided path
        logging.basicConfig(
            format=format,
            level=level,
            handlers=[
                logging.FileHandler(os.path.join(log_path, "fonduer.log")),
                logging.StreamHandler(),
            ],
        )

        # Notify user of log location
        logger.info(f"Setting logging directory to: {log_path}")
        Meta.log_path = log_path
    else:
        logger.info(
            f"Logging was already initialized to use {Meta.log_path}.  "
            "To configure logging manually, call fonduer.init_logging before "
            "initialiting Meta."
        )