Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds SQL statement logging capability for debug mode by introducing a logging wrapper around database execution calls. The changes enable developers to trace SQL execution when debug mode is enabled.
Key Changes:
- Added
IsDebug()helper function to the logger package for checking debug mode status - Created new SQL logging utility functions that wrap
ExecContextcalls with debug logging - Updated all
ExecContextcalls in postgres and apply commands to use the new logging wrappers
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
internal/logger/logger.go |
Added IsDebug() function to expose debug mode status |
cmd/util/sql_logger.go |
New utility file with SQL execution logging wrappers for *sql.DB and *sql.Conn |
internal/postgres/external.go |
Replaced direct ExecContext calls with logging wrapper in schema management operations |
internal/postgres/embedded.go |
Replaced direct ExecContext calls with logging wrapper in schema management operations |
cmd/apply/apply.go |
Replaced direct ExecContext calls with logging wrapper for lock timeout, search_path, and SQL execution operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix #150