Skip to content

Commit

Permalink
build: Reduce Verbose Logging (#158)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

Reduce verbose logging when default log level is set or LOG_LEVEL is set
to INFO

fixes #157
  • Loading branch information
JackPlowman authored Oct 14, 2024
1 parent 19dd4aa commit 94fea82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion analyser/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_statistics() -> None:
for repository in list_of_repositories
]
).to_json(DEFAULT_FILE_LOCATION, orient="records")
logger.info("Saved statistics to file", file_location=DEFAULT_FILE_LOCATION)
logger.debug("Saved statistics to file", file_location=DEFAULT_FILE_LOCATION)


def create_repository_statistics(repository_name: str, path_to_repo: str) -> CataloguedRepository:
Expand Down
4 changes: 2 additions & 2 deletions analyser/utils/github_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def clone_repo(owner_name: str, repository_name: str) -> str:
if not Path.exists(Path(file_path)):
repo_url = f"https://github.com/{owner_name}/{repository_name}.git"
Repo.clone_from(repo_url, Path(file_path))
logger.info("Cloned repository", owner_name=owner_name, repository_name=repository_name)
logger.debug("Cloned repository", owner_name=owner_name, repository_name=repository_name)
return file_path


Expand All @@ -39,7 +39,7 @@ def retrieve_repositories() -> PaginatedList[Repository]:
github = Github(getenv("INPUT_GITHUB_TOKEN"))
repositories = github.search_repositories(query=f'user:{getenv("INPUT_REPOSITORY_OWNER")} archived:false')
logger.info(
"Found repositories",
"Retrieved repositories to analyse",
repositories_count=repositories.totalCount,
repositories=[repository.full_name for repository in repositories],
)
Expand Down

0 comments on commit 94fea82

Please sign in to comment.