-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Write to log file when using DEBUG=*
#17906
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
Merged
Merged
Conversation
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
b40a683
to
1fe008d
Compare
This log happens when we are traversing using the gitignore walker
DEBUG=*
DEBUG=*
|
||
### Fixed | ||
|
||
- Ensure negative arbitrary `scale` values generate negative values ([#17831](https://github.com/tailwindlabs/tailwindcss/pull/17831)) | ||
- Fix HAML extraction with embedded Ruby ([#17846](https://github.com/tailwindlabs/tailwindcss/pull/17846)) | ||
- Don't scan files for utilities when using `@reference` ([#17836](https://github.com/tailwindlabs/tailwindcss/pull/17836)) | ||
- Fix incorrectly replacing `_` with ` ` in arbitrary modifier shorthand `bg-red-500/(--my_opacity)` ([#17889](https://github.com/tailwindlabs/tailwindcss/pull/17889)) | ||
- Upgrade: Bump dependendencies in parallel and make the upgrade faster ([#17898](https://github.com/tailwindlabs/tailwindcss/pull/17898)) | ||
- Upgrade: Bump dependencies in parallel and make the upgrade faster ([#17898](https://github.com/tailwindlabs/tailwindcss/pull/17898)) |
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.
🫣
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.
🤫
This allows us to: 1. Only output the header once 2. Output a log from Oxide that will end up underneath the header
thecrypticace
approved these changes
May 7, 2025
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 improves the debugability of the scanner when using
DEBUG=*
by writing to atailwindcss-{pid}.log
file in the current working directory.It will include all the tracing information from the scanner. This PR also introduces
Discovering {path}
andReading {path}
logs.Discovering {path}
— this is logged when we are traversing the file system looking for files. We use theignore
crate, and log this information in thefilter_entry
callback. If a file was already ignored by.gitignore
files, this won't show up, but it also means that we will not read it.Reading {path}
— this is when we are actually reading the file so we can start extracting potential Tailwind CSS classes.These will give you some insights in what paths are being scanned, and if we get stuck, where we get stuck.
Also, we are appending to the file. In the log below, you can already see that a
tailwindcss-<number>.log
file exists already even though it didn't exist before running the command. This should make it easier to debug if we get stuck on a specific file/folder because the file will be populated with information.There are a few reasons for appending to a file:
@source
directives, you could diff the outputs. (although, the timestamps will be different)DEBUG=*
, a lot of other tools also output debug information, so writing to a file should make this better.Example log
We also output where we are writing the file to. This looks like this when using the CLI:

Last but not least, this also ignores
.log
files by defaultTest plan
Ran the CLI (but you can use any tool real, since this is implemented in Oxide) with the
DEBUG=*
flag.The file generated, looks like the example I shared above.