Skip to content

Print sources when DEBUG=* is set#17952

Merged
RobinMalfait merged 2 commits intomainfrom
feat/print-sources-when-debugging
May 9, 2025
Merged

Print sources when DEBUG=* is set#17952
RobinMalfait merged 2 commits intomainfrom
feat/print-sources-when-debugging

Conversation

@RobinMalfait
Copy link
Member

This PR improves the debug logging by also adding the provided @source to the log file. It will also print the optimized sources (the ones we expand and mark as Auto or Pattern).

In the logs, this will look like this:

2025-05-09T11:03:32.906478Z INFO tailwindcss_oxide::scanner: Provided sources: 2025-05-09T11:03:32.906544Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/github.com/RobinMalfait/spreadsheet", pattern: "**/*", negated: false } 2025-05-09T11:03:32.906589Z INFO tailwindcss_oxide::scanner: Optimized sources: 2025-05-09T11:03:32.906595Z INFO tailwindcss_oxide::scanner: Source: Auto { base: "/Users/robin/github.com/RobinMalfait/spreadsheet" } 

Or if you have more sources:

2025-05-09T11:06:54.767546Z INFO tailwindcss_oxide::scanner: Provided sources: 2025-05-09T11:06:54.767660Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/github.com/RobinMalfait/spreadsheet", pattern: "**/*", negated: false } 2025-05-09T11:06:54.767987Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/github.com/RobinMalfait/spreadsheet/app", pattern: "./routes/*.{jsx,tsx}", negated: false } 2025-05-09T11:06:54.767992Z INFO tailwindcss_oxide::scanner: Source: PublicSourceEntry { base: "/Users/robin/github.com/RobinMalfait/spreadsheet/app", pattern: "./utils/*.ts", negated: false } 2025-05-09T11:06:54.768450Z INFO tailwindcss_oxide::scanner: Optimized sources: 2025-05-09T11:06:54.768455Z INFO tailwindcss_oxide::scanner: Source: Auto { base: "/Users/robin/github.com/RobinMalfait/spreadsheet" } 2025-05-09T11:06:54.768459Z INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users/robin/github.com/RobinMalfait/spreadsheet/app/routes", pattern: "*.jsx" } 2025-05-09T11:06:54.768462Z INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users/robin/github.com/RobinMalfait/spreadsheet/app/routes", pattern: "*.tsx" } 2025-05-09T11:06:54.768466Z INFO tailwindcss_oxide::scanner: Source: Pattern { base: "/Users/robin/github.com/RobinMalfait/spreadsheet/app/utils", pattern: "*.ts" } 
@RobinMalfait RobinMalfait requested a review from a team as a code owner May 9, 2025 11:07
Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

Nice!

@RobinMalfait RobinMalfait merged commit 2f6679a into main May 9, 2025
7 checks passed
@RobinMalfait RobinMalfait deleted the feat/print-sources-when-debugging branch May 9, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants