Provide more logs#41
Open
Vladyslav-Kuksiuk wants to merge 4 commits into
Open
Conversation
dmytro-kashcheiev
approved these changes
May 27, 2026
Collaborator
dmytro-kashcheiev
left a comment
There was a problem hiding this comment.
@Vladyslav-Kuksiuk LGTM
There was a problem hiding this comment.
Pull request overview
This PR increases observability of the embed/check workflow by adding new info-level log statements across CLI/config loading, document selection, embedding processing, and fragment extraction, and introduces a helper for producing “clickable” file references in logs.
Changes:
- Add new
slog.Infomessages across CLI, embedding, parsing, and fragmentation to describe progress and skip reasons. - Introduce
logging.FileReference()and adopt it in multiple log messages. - Fix propagation of
doc-excludesfrom command-line args into the runtime configuration (with a new test).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Adds startup log and helper formatting for config labels. |
| logging/logger.go | Adds FileReference() helper for log-friendly file URLs. |
| fragmentation/resolver.go | Adds info logs for missing source files/fragments and uses file references in messages. |
| embedding/processor.go | Adds detailed processing/checking logs and logs include/exclude pattern resolution. |
| embedding/parsing/instruction.go | Adds logs describing what content an instruction extracted (fragment/pattern/full file). |
| cli/cli.go | Adds logs for config loading and setup selection; propagates DocExcludes into runtime config. |
| cli/cli_test.go | Adds test ensuring command-line doc-excludes is copied into runtime configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+98
| // FileReference returns a clickable file URL when the path can be made absolute. | ||
| func FileReference(path string) string { | ||
| absPath, err := filepath.Abs(path) | ||
| if err != nil { | ||
| return path | ||
| } | ||
|
|
||
| return "file://" + absPath | ||
| } |
| @@ -66,13 +72,24 @@ func ResolveContent(codePath string, fragmentName string, config config.Configur | |||
| fragment, found := content.fragments[fragmentName] | |||
| if !found { | |||
| codeFileReference := "file://" + source.absolutePath | |||
Comment on lines
94
to
99
| func (p Processor) Embed() (*parsing.Context, error) { | ||
| if !slices.Contains(p.requiredDocPaths, p.DocFilePath) { | ||
| slog.Info(fmt.Sprintf("Skipping `%s`; it is excluded by the configuration.", | ||
| logging.FileReference(p.DocFilePath))) | ||
| return nil, nil | ||
| } |
Comment on lines
+137
to
+145
| // configNameLabel formats a configuration name for human-readable log messages. | ||
| func configNameLabel(config configuration.Configuration) string { | ||
| if config.Name == "" { | ||
| return "" | ||
| } | ||
|
|
||
| return fmt.Sprintf(" for `%s`", config.Name) | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds more logs throughout the embedding process.
These
infologs are displayed only when the application is launched with the--infoargument.Logs example:

Partly resolves this issue.