Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: remove debugging code and logging statements
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
  • Loading branch information
ErichBSchulz and aider-chat-bot committed Oct 29, 2025
commit f6dcda596015ac16bf25d2d01607afe0f140abc2
16 changes: 0 additions & 16 deletions aider/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,12 @@ def __init__(
map_cache_dir=".",
repomap_in_memory=False,
preserve_todo_list=False,
logger=None,
):
# initialize from args.map_cache_dir
self.map_cache_dir = map_cache_dir

# Fill in a dummy Analytics if needed, but it is never .enable()'d
self.analytics = analytics if analytics is not None else Analytics()
self.logger = logger

self.event = self.analytics.event
self.chat_language = chat_language
Expand Down Expand Up @@ -1076,8 +1074,6 @@ async def _run_patched(self, with_message=None, preproc=True):
processing_task = None
try:
if with_message:
if self.logger:
self.logger.debug(f"Running with message: {with_message}")
self.io.user_input(with_message)
await self.run_one(with_message, preproc)
return self.partial_response_content
Expand All @@ -1092,16 +1088,6 @@ async def _run_patched(self, with_message=None, preproc=True):
and not user_message
and (not processing_task or not self.io.placeholder)
):
if self.logger:
self.logger.debug(
"CONDITION MET to get input. "
f"confirmation_in_progress={self.confirmation_in_progress}, "
f"input_task is None={input_task is None}, "
f"user_message is None={user_message is None}, "
f"processing_task is None={processing_task is None}, "
f"placeholder={self.io.placeholder!r}"
)
self.logger.debug("Getting input from user")
if not self.suppress_announcements_for_next_prompt:
self.show_announcements()
self.suppress_announcements_for_next_prompt = False
Expand Down Expand Up @@ -1137,8 +1123,6 @@ async def _run_patched(self, with_message=None, preproc=True):

try:
user_message = input_task.result()
if self.logger:
self.logger.debug(f"Got user_message: {user_message!r}")
except (asyncio.CancelledError, KeyboardInterrupt):
user_message = None
input_task = None
Expand Down
2 changes: 0 additions & 2 deletions aider/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,6 @@ async def do_run(self, cmd_name, args):
return

try:
if self.coder.logger:
self.coder.logger.debug(f"Executing command: {cmd_name} with args: {args!r}")
if asyncio.iscoroutinefunction(cmd_method):
return await cmd_method(args)
else:
Expand Down
20 changes: 0 additions & 20 deletions aider/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
import threading
import traceback
import webbrowser
import logging
from dataclasses import fields
from pathlib import Path

DEBUG_COUNTER = 6

try:
import git
except ImportError:
Expand Down Expand Up @@ -615,22 +612,6 @@ def get_io(pretty):
io = get_io(False)
io.tool_warning("Terminal does not support pretty output (UnicodeDecodeError)")

# setup logging
log_file = os.path.expanduser("~/.aider/debug.log")
if not os.path.exists(os.path.dirname(log_file)):
os.makedirs(os.path.dirname(log_file))

log_handler = logging.FileHandler(log_file, mode="a", encoding="utf-8")
log_formatter = logging.Formatter("%(asctime)s - %(levelname)s - BUG20251029 - %(message)s")
log_handler.setFormatter(log_formatter)
logger = logging.getLogger("aider_debug")
logger.addHandler(log_handler)
logger.setLevel(logging.DEBUG)
logger.propagate = False # prevent output to console
logger.info(f"Aider starting up, DEBUG_COUNTER = {DEBUG_COUNTER}")

io.tool_output(f"DEBUG COUNTER: {DEBUG_COUNTER}")

# Process any environment variables set via --set-env
if args.set_env:
for env_setting in args.set_env:
Expand Down Expand Up @@ -1075,7 +1056,6 @@ def get_io(pretty):
context_compaction_max_tokens=args.context_compaction_max_tokens,
context_compaction_summary_tokens=args.context_compaction_summary_tokens,
map_cache_dir=args.map_cache_dir,
logger=logger,
)
except UnknownEditFormat as err:
io.tool_error(str(err))
Expand Down
4 changes: 2 additions & 2 deletions debug_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ tracking to ensure clarity and correctness.
specific placeholder and its cleanup will still be handled within `aider/commands.py`. The
debug counter will be incremented to version 5.
*Status: This fixed the race condition, but introduced a distracting spinner during user prompts.*
* `[ ]` **Fix Distracting Spinner**
* `[✓]` **Fix Distracting Spinner**
To fix the spinner appearing during user prompts, I will remove the `self.io.start_spinner("Processing...")`
call from `_run_patched` in `aider/coders/base_coder.py`. Spinners for LLM activity are
handled elsewhere. The debug counter will be incremented to version 6.
* `[ ]` **Clean up debugging code**
* `[✓]` **Clean up debugging code**
Once the bug is confirmed to be fixed, I will remove the debug counter, the file logger,
and all the `BUG20251029` logging statements from the code.