Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

RATIONALE

Multiple TUI components were independently calling tea.LogToFile("tea-debug.log", "debug"), creating fragmented debug logs. Consolidating to a single dr-tui-debug.log file improves debuggability.

CHANGES

  • Created tui/logging.go with SetupDebugLogging() helper that returns cleanup function
  • Updated cmd/dotenv/cmd.go and cmd/templates/setup/cmd.go to use centralized logging setup
  • Changed debug log filename from tea-debug.log to dr-tui-debug.log
  • Updated .gitignore accordingly

Before:

f, err := tea.LogToFile("tea-debug.log", "debug")
if err != nil {
    fmt.Println("fatal:", err)
    os.Exit(1)
}
defer f.Close()

After:

cleanup, err := tui.SetupDebugLogging()
if err != nil {
    return err
}
defer cleanup()

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update logfile for debugging purposes Consolidate TUI debug logging to single dr-tui-debug.log file Nov 6, 2025
Copilot finished work on behalf of cdevent November 6, 2025 21:21
Copilot AI requested a review from cdevent November 6, 2025 21:21
@cdevent cdevent closed this Nov 6, 2025
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.

3 participants