Skip to content
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

Feature request: Log level control for pre-defined formats #814

Closed
otaviomad opened this issue Apr 22, 2022 · 2 comments
Closed

Feature request: Log level control for pre-defined formats #814

otaviomad opened this issue Apr 22, 2022 · 2 comments

Comments

@otaviomad
Copy link

Hey,

I've been using SD to implement design tokens in our company. In our current way of working, we're spreading stuff in multiple files which reference variables only present in other files, while using outputReferences.

One use case for this is having a component consume a variable color, as defined by a theme with a css selector. For example:

/* themes/blue.css */
.theme-blue {
  --default-color: blue
}

/* components/button.css */
.button {
  background-color: var(--default-color)
}

however, when using this approach, we invariably get hit with a barrage of warning messages saying While building components/button.css, filtered out token references were found; output may be unexpected. Here are the references that are used but not defined in the file.

This ends up hiding actual important messages that may crop up during the build process and the warning itself is irrelevant, since this is the intende output.

Perhaps a good idea would be to add an optional "logLevel" property to the format options so that these messages can be filtered out? Thanks!

@chazzmoney
Copy link
Collaborator

Thanks @otaviomad for the suggestion. We have had several requests from the community for more fine grained control over logging, warning, and erroring across the entire project. We agree that this is important and have made it one of the major focuses for our next major release. You can read more in issue #643

@jorenbroekema
Copy link
Collaborator

Logging can be configured quite nicely now on the v4 branch, warnings can be silenced and are less verbose by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants