File tree Expand file tree Collapse file tree 3 files changed +4
-82
lines changed
Expand file tree Collapse file tree 3 files changed +4
-82
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99from pathlib import Path
1010from typing import Any
1111
12- from azure .identity import DefaultAzureCredential # type: ignore[reportMissingImports]
13- from azure .storage .blob import BlobServiceClient # type: ignore[reportMissingImports]
12+ from azure .identity import DefaultAzureCredential
13+ from azure .storage .blob import BlobServiceClient
1414
1515
1616class BlobWorkflowLogger (logging .Handler ):
Original file line number Diff line number Diff line change 3737from pathlib import Path
3838
3939from graphrag .config .enums import ReportingType
40+ from graphrag .config .models .graph_rag_config import GraphRagConfig
4041from graphrag .config .models .reporting_config import ReportingConfig
4142
4243
43- def get_logger (name : str ) -> logging .Logger :
44- """Get a logger with the given name under the graphrag hierarchy.
45-
46- Parameters
47- ----------
48- name : str
49- The name of the logger. Typically pass __name__ to get module-specific logger.
50-
51- Returns
52- -------
53- logging.Logger
54- A logger configured for the graphrag package.
55- """
56- return logging .getLogger (
57- f"graphrag.{ name } " if not name .startswith ("graphrag" ) else name
58- )
59-
60-
6144def init_loggers (
6245 config : ReportingConfig | None = None ,
6346 root_dir : str | None = None ,
6447 log_level : int | str = logging .INFO ,
6548 enable_console : bool = False ,
6649 log_file : str | Path | None = None ,
67- log_format : str = "%(asctime)s - %(levelname)s - %(name)s - %(message)s" ,
50+ log_format : str = "%(asctime)s.%(msecs)04d - %(levelname)s - %(name)s - %(message)s" ,
6851 date_format : str = "%Y-%m-%d %H:%M:%S" ,
6952) -> None :
7053 """Initialize logging handlers for graphrag based on configuration.
You can’t perform that action at this time.
0 commit comments