class_docstr: Context for MetricFlow CLI.
docstr: Initialize the logging spec for the CLI.
  
  This requires a fully loaded dbt project, including what amounts to a call to dbt debug.
  As a practical matter, this should not have much end user impact except in cases where they are
  using commands that do not require a working adapter AND the call to dbt debug runs slowly.
  In future we may have better API access to the log file location for the project, at which time
  we can swap this out and return to full lazy loading for any context attributes that are slow
  to initialize.
docstr_tok: ["Initialize","the","logging","spec","for","the","CLI",".","This","requires","a","fully","loaded","dbt","project",",","including","what","amounts","to","a","call","to","dbt","debug",".","As","a","practical","matter",",","this","should","not","have","much","end","user","impact","except","in","cases","where","they","are","using","commands","that","do","not","require","a","working","adapter","AND","the","call","to","dbt","debug","runs","slowly",".","In","future","we","may","have","better","API","access","to","the","log","file","location","for","the","project",",","at","which","time","we","can","swap","this","out","and","return","to","full","lazy","loading","for","any","context","attributes","that","are","slow","to","initialize","."]
code: def _configure_logging(self, log_file_path: pathlib.Path) -> None:
      """Initialize the logging spec for the CLI.
  
      This requires a fully loaded dbt project, including what amounts to a call to dbt debug.
      As a practical matter, this should not have much end user impact except in cases where they are
      using commands that do not require a working adapter AND the call to dbt debug runs slowly.
      In future we may have better API access to the log file location for the project, at which time
      we can swap this out and return to full lazy loading for any context attributes that are slow
      to initialize.
      """
      log_format = "%(asctime)s %(levelname)s %(filename)s:%(lineno)d [%(threadName)s] - %(message)s"
      logging.basicConfig(level=logging.INFO, format=log_format)
  
      log_file_handler = TimedRotatingFileHandler(
          filename=log_file_path,
          # Rotate every day to a new file, keep 7 days worth.
          when="D",
          interval=1,
          backupCount=7,
      )
  
      formatter = logging.Formatter(fmt=log_format)
      log_file_handler.setFormatter(formatter)
      log_file_handler.setLevel(logging.INFO)
  
      root_logger = logging.getLogger()
      # StreamHandler to the console would have been setup by logging.basicConfig
      for handler in root_logger.handlers:
          handler.setLevel(logging.CRITICAL)
      root_logger.addHandler(log_file_handler)
  
imports: from __future__ import annotations
  import logging
  import pathlib
  from logging.handlers import TimedRotatingFileHandler
  from typing import Dict, Optional
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from metricflow.cli.dbt_connectors.adapter_backed_client import AdapterBackedSqlClient
  from metricflow.cli.dbt_connectors.dbt_config_accessor import dbtArtifacts, dbtProjectMetadata
  from metricflow.engine.metricflow_engine import MetricFlowEngine
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.protocols.sql_client import SqlClient
label_desc: Use image node_id 2 for calling the CLIContext obj's underlying member method code with example usage: obj._configure_logging(log_file_path) without return types