Add debug logging for filesystem traversal in URL collection functions

Introduce debug output in CollectURLsWithIgnoreConfig, CollectURLsProgressWithIgnoreConfig, and CollectURLsV2 functions to log the paths being walked during filesystem traversal. This change aids in debugging and provides better visibility into the URL collection process.
This commit is contained in:
Luke Hagar
2025-09-19 19:06:44 +00:00
parent 1b5d18b4a4
commit f74fe031f2

View File

@@ -196,6 +196,9 @@ func CollectURLsWithIgnoreConfig(rootPath string, globs []string, respectGitigno
// Walk the filesystem
walkFn := func(path string, d os.DirEntry, err error) error {
if isDebugEnv() {
fmt.Printf("::debug:: Walking path: %s\n", path)
}
if err != nil {
return nil
@@ -366,6 +369,9 @@ func CollectURLsProgressWithIgnoreConfig(rootPath string, globs []string, respec
const maxSize = 2 * 1024 * 1024
walkFn := func(path string, d os.DirEntry, err error) error {
if isDebugEnv() {
fmt.Printf("::debug:: Walking path: %s\n", path)
}
if err != nil {
return nil
@@ -919,6 +925,9 @@ func CollectURLsV2(rootPath string, globs []string, respectGitignore bool, ignor
// Walk the filesystem
walkFn := func(path string, d os.DirEntry, err error) error {
if isDebugEnv() {
fmt.Printf("::debug:: Walking path: %s\n", path)
}
if err != nil {
return nil