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

Add more robust log level #367

Open
dbanksdesign opened this issue Dec 18, 2019 · 8 comments
Open

Add more robust log level #367

dbanksdesign opened this issue Dec 18, 2019 · 8 comments
Milestone

Comments

@dbanksdesign
Copy link
Member

As a user of Style Dictionary, I would like to control the log level of Style Dictionary so that I can limit the amount of content sent to the console.

Currently we do have a log level option on the config, although it is not documented and currently only used in 1 place: https://github.com/amzn/style-dictionary/blob/master/lib/extend.js#L127

I'd like to define this a bit more, but my initial thinking would be to offer log levels of "error", "warning", "info", "none"

@twaiiiin
Copy link

twaiiiin commented Jun 3, 2020

It would be really nice indeed.

We are building a design system which uses Style Dictionary. Our build tool uses a custom CLI with various arguments like --quiet or --silent to change the log level. It works fine with our build tasks/jobs but Style Dictionary logs persist. It would be really nice to be able to configure Style Dictionary log level. Sometimes we need it and sometimes we don't.

I wish I could make a pull request for this and contribute, but I'm a beginner with node and npm.

@dbanksdesign
Copy link
Member Author

We will be working on this as part of the next major release, so we will tackle this soon!

@Jasperrr91
Copy link

Any updates on this @dbanksdesign ? Seems like it was picked up for 3.0 but then let go soon after. It's been 2.5 years now and some sort of warning suppression would be nice.

We too are setting up a design system with Style Dictionary and because we dynamically generate our SD configs depending on the input of Figma Tokens config files, I'd prefer to just suppress collision warnings instead of fiddle around with the include config option.

I'd be happy to help out if needed but I don't want to risk starting on something and then seeing it get closed right away.

@DarioSoller
Copy link

I am in the exact same use case like @Jasperrr91 ! So big +1 for clean log levels from my side!

@Matheun
Copy link

Matheun commented May 2, 2023

Would also love to see something like this implemented
I let SD generate my tokens for each file, multi brand and multi theme.

this results in cli output like the following:
vuetify
✔︎ build/styles/components/button/_button.theme.dark.scss

vuetify
✔︎ build/styles/themes/_theme.dark.color.scss

vuetify
✔︎ build/styles/themes/_theme.dark.outline.scss

this is not ideal, would love to see some option to disable certain cli outputs.

@blackfalcon
Copy link

Currently working in a project where we are implementing a darkmode series of tokens and using a system of "./src/color/brand.json", "./src/color-darkmode/*.json" whereas I want to only have a token duplicated if it is different and have the base pass through.

This works great, but yes, the conflict logging is causing stress with the team.

Having a way to suppress this would be AWESOME @dbanksdesign

@dbanksdesign
Copy link
Member Author

We are starting to work on v4 right now and this will be part of v4. @blackfalcon you are talking about the 'property value collision' warnings right? You can get around that now by using include and source: https://stackblitz.com/edit/node-8rqmfn?file=sd.config.js,tokens%2Fcolors.json,dark-mode%2Fcolors.json collisions don't get output if it is something from source overriding something from include

@blackfalcon
Copy link

@dbanksdesign thanks! That's exactly what I was looking for!

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

6 participants