Skip to content

Commit e393874

Browse files
committed
cleanup unused code
1 parent e7e0449 commit e393874

File tree

3 files changed

+4
-82
lines changed

3 files changed

+4
-82
lines changed

graphrag/config/logging.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

graphrag/logger/blob_workflow_logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from pathlib import Path
1010
from 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

1616
class BlobWorkflowLogger(logging.Handler):

graphrag/logger/standard_logging.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,17 @@
3737
from pathlib import Path
3838

3939
from graphrag.config.enums import ReportingType
40+
from graphrag.config.models.graph_rag_config import GraphRagConfig
4041
from 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-
6144
def 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.

0 commit comments

Comments
 (0)