-
Notifications
You must be signed in to change notification settings - Fork 32
chore: Add new logs and support time format display #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds timestamp formatting to log output and verification messages to improve debugging and tracking capabilities.
- Enables timestamps in the logger configuration with a consistent format ("2006-01-02 15:04:05")
- Adds timestamps to verification messages to track when each verification case is processed
- Includes a debug log for trigger completion events
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/logger/log.go | Enables timestamp logging with standardized format |
| internal/components/trigger/http.go | Adds debug logging for trigger result sending; contains an unintended formatting change |
| commands/verify/verify.go | Adds timestamp formatting function and prepends timestamps to verification messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/logger/log.go
Outdated
| DisableTimestamp: true, | ||
| DisableTimestamp: false, | ||
| FullTimestamp: true, | ||
| TimestampFormat: "2006-01-02 15:04:05", |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp format is duplicated between the logger configuration and the formatVerificationTime() function in commands/verify/verify.go. Consider defining this format as a constant in a shared location to ensure consistency and ease of maintenance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
internal/components/trigger/http.go
Outdated
| req, err := h.request() | ||
| if err != nil { | ||
| logger.Log.Errorf("failed to create new request %v", err) | ||
| logger.Log.Errorf("failed to create new request %v", err) |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space between 'request' and '%v' appears to be unintentional.
| logger.Log.Errorf("failed to create new request %v", err) | |
| logger.Log.Errorf("failed to create new request %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Add new logs and support time format display for troubleshooting
1、Log the trigger's final execution count and error (if any) at info level when a result is sent to the channel. This provides clear visibility into the trigger's status for troubleshooting.
2、Add formatted timestamp display to logs to help reconstruct the timeline of events for easier troubleshooting.