Skip to content

perf(logging): remove irrelevant debug logging statements #1147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/semantic_release/changelog/release_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def from_git_history(
# commits included, the true reason for a version bump would be missing.
if has_exclusion_match and commit_level_bump == LevelBump.NO_RELEASE:
log.info(
"Excluding commit [%s] %s",
commit.hexsha[:8],
commit_message.replace("\n", " ")[:50],
"Excluding commit[%s] %s",
parse_result.short_hash,
commit_message.split("\n", maxsplit=1)[0][:40],
)
continue

Expand All @@ -145,29 +145,29 @@ def from_git_history(
str.join(
" ",
[
"Excluding commit %s (%s) because parser determined",
"Excluding commit[%s] (%s) because parser determined",
"it should not included in the changelog",
],
),
commit.hexsha[:8],
parse_result.short_hash,
commit_message.replace("\n", " ")[:20],
)
continue

if the_version is None:
log.info(
"[Unreleased] adding '%s' commit(%s) to list",
commit.hexsha[:8],
"[Unreleased] adding commit[%s] to unreleased '%s'",
parse_result.short_hash,
commit_type,
)
unreleased[commit_type].append(parse_result)
continue

log.info(
"[%s] adding '%s' commit(%s) to release",
"[%s] adding commit[%s] to release '%s'",
the_version,
parse_result.short_hash,
commit_type,
commit.hexsha[:8],
)

released[the_version]["elements"][commit_type].append(parse_result)
Expand Down
1 change: 0 additions & 1 deletion src/semantic_release/changelog/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def environment(
autoescape_value = dynamic_import(autoescape)
else:
autoescape_value = autoescape
log.debug("%s", locals())

return ComplexDirectorySandboxedEnvironment(
block_start_string=block_start_string,
Expand Down
2 changes: 1 addition & 1 deletion src/semantic_release/cli/commands/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def is_forced_prerelease(
log.debug(
"%s: %s",
is_forced_prerelease.__name__,
", ".join(f"{k} = {v}" for k, v in local_vars),
str.join(", ", iter(f"{k} = {v}" for k, v in local_vars)),
)
return (
as_prerelease
Expand Down
2 changes: 1 addition & 1 deletion src/semantic_release/cli/masking_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(

def add_mask_for(self, data: str, name: str = "redacted") -> MaskingFilter:
if data and data not in self._UNWANTED:
log.debug("Adding redact pattern %r to _redact_patterns", name)
log.debug("Adding redact pattern '%r' to redact_patterns", name)
self._redact_patterns[name].add(data)
return self

Expand Down
1 change: 0 additions & 1 deletion src/semantic_release/version/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def dfs(start_commit: Commit, stop_nodes: set[Commit]) -> Sequence[Commit]:
# Add all parent commits to the stack from left to right so that the rightmost is popped first
# as the left side is generally the merged into branch
for parent in node.parents:
logger.debug("queuing parent commit %s", parent.hexsha[:7])
stack.put(parent)

return commits
Expand Down
Loading