Skip to content

chore: ignore stray log files in the repository root - #382

Merged
YoungJinJung merged 1 commit into
mainfrom
chore/issue-381-ignore-log-files
Sep 29, 2026
Merged

YoungJinJung merged 1 commit into
mainfrom
chore/issue-381-ignore-log-files

Conversation

@YoungJinJung

Copy link
Copy Markdown
Contributor

Summary

An MCP server run in the working directory left a 305 KB valkey-mcp-server.log in the repo root. It showed as untracked and git add -A would have committed it.

# Stray logs from tools run in the repo root; unic writes its own to ~/.config/unic/logs/
*.log

Why the broad rule is safe here

A blanket *.log can hide files someone meant to commit, so I checked both directions before reaching for it:

  • Nothing is tracked today. git ls-files '*.log' is empty, so this changes nothing about existing history. (A rule cannot untrack a tracked file anyway — worth confirming there were none rather than assuming.)
  • unic's own log is outside the repository. internal/log/log.go resolves logDir() to $XDG_CONFIG_HOME/unic/logs, falling back to ~/.config, and writes unic.log there. The rule never applies to it.

So the only thing this catches is exactly the class of file that prompted it.

Validation

Created valkey-mcp-server.log and a second some-tool.log in a clean tree:

$ git status --short
 M .gitignore          # only the rule itself

$ git check-ignore -v valkey-mcp-server.log
.gitignore:8:*.log	valkey-mcp-server.log

go build ./... and go test ./... pass, though neither exercises this file.

Closes #381

An MCP server run in the working directory left a 305 KB
valkey-mcp-server.log in the repo root, where it showed as untracked and
could be swept in by `git add -A`.

Safe to ignore broadly: no .log file is tracked today, and unic writes
its own log outside the repository — internal/log/log.go resolves
logDir() to $XDG_CONFIG_HOME/unic/logs, falling back to ~/.config.

Closes #381
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: DevopsArtFactory/unic/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 72699c46-976b-4ba4-ab0d-03bd269e4db0

📥 Commits

Reviewing files that changed from the base of the PR and between 5e3c01b and 585d7cf.

📒 Files selected for processing (1)
  • .gitignore

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR correctly adds *.log to .gitignore to prevent stray tool logs from being tracked. The change is well-justified and safe:

  • No .log files are currently tracked in the repository
  • unic's own logs are written outside the repo to ~/.config/unic/logs/
  • The rule has been validated with git check-ignore

No blocking issues found. This is ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@YoungJinJung
YoungJinJung merged commit fbced78 into main Sep 29, 2026
4 checks passed
@YoungJinJung
YoungJinJung deleted the chore/issue-381-ignore-log-files branch September 29, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: ignore stray log files in the repository root

1 participant