--log-level DEBUG removes log file #4057

Open
opened 2026-02-16 17:42:28 -05:00 by yindo · 1 comment
Owner

Originally created by @strk on GitHub (Jan 1, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When running opencode with no switches I see a file named 2026-01-01T152627.log appears under ~/.local/share/opencode/log

Then I follow the instructions in https://opencode.ai/docs/troubleshooting/#logs and pass the --log-level DEBUG switch. When I do that, the file that was created before is REMOVED, and no new file is created.

OpenCode version

1.0.62

Steps to reproduce

  1. Remove all files from ~/.local/share/opencode/log
  2. Run opencode
  3. See that a new file was created under ~/.local/share/opencode/log
  4. Run opencode --log-level DEBUG
  5. See that no files are now under ~/.local/share/opencode/log

Screenshot and/or share link

No response

Operating System

Debian GNU/Linux 13 (trixie)

Terminal

No response

Originally created by @strk on GitHub (Jan 1, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When running `opencode` with no switches I see a file named `2026-01-01T152627.log` appears under ~/.local/share/opencode/log Then I follow the instructions in https://opencode.ai/docs/troubleshooting/#logs and pass the `--log-level DEBUG` switch. When I do that, the file that was created before is REMOVED, and no new file is created. ### OpenCode version 1.0.62 ### Steps to reproduce 1. Remove all files from ~/.local/share/opencode/log 2. Run `opencode` 3. See that a new file was created under ~/.local/share/opencode/log 4. Run `opencode --log-level DEBUG` 5. See that no files are now under ~/.local/share/opencode/log ### Screenshot and/or share link _No response_ ### Operating System Debian GNU/Linux 13 (trixie) ### Terminal _No response_
yindo added the bug label 2026-02-16 17:42:28 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 1, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5004: Excessive Informational Logging Clutters Log Files in Default Configuration
  • #4999: Log File Deleted When Multiple IDE Instances Are Attached to OpenCode Server
  • #5006: TUI Renders Truncated LLM Response Despite Full Output in Log File

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 1, 2026): This issue might be a duplicate of existing issues. Please check: - #5004: Excessive Informational Logging Clutters Log Files in Default Configuration - #4999: Log File Deleted When Multiple IDE Instances Are Attached to OpenCode Server - #5006: TUI Renders Truncated LLM Response Despite Full Output in Log File Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4057