Skip to content

Conversation

@youjie23
Copy link
Contributor

@youjie23 youjie23 commented Nov 4, 2025

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.

Copy link

Copilot AI left a 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.

DisableTimestamp: true,
DisableTimestamp: false,
FullTimestamp: true,
TimestampFormat: "2006-01-02 15:04:05",
Copy link

Copilot AI Nov 4, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

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)
Copy link

Copilot AI Nov 4, 2025

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.

Suggested change
logger.Log.Errorf("failed to create new request %v", err)
logger.Log.Errorf("failed to create new request %v", err)

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@wu-sheng wu-sheng merged commit 01b80d9 into apache:main Nov 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants