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

write-fonts: put logging behind a feature #397

Closed
cmyr opened this issue May 10, 2023 · 3 comments
Closed

write-fonts: put logging behind a feature #397

cmyr opened this issue May 10, 2023 · 3 comments

Comments

@cmyr
Copy link
Member

cmyr commented May 10, 2023

I think the best way to do this is going to be to have our own set of macros that use #[cfg(...)] to either generate the actual log calls or to no-op, based on the presence of the feature.

@rsheeter
Copy link
Collaborator

dot2 as well, per #396 (comment)

@cmyr
Copy link
Member Author

cmyr commented May 12, 2023

dot2 is behind a feature, just that feature is enabled by default; log isn't behind a feature at all.

@cmyr
Copy link
Member Author

cmyr commented May 23, 2023

Okay so I have some more info on this:

the log crate itself provides a set of features that let a crate choose, at compile time, what level (if any) of log messages it wants to be compiled into the binary.

Due to the nature of rust features, enabling one of these in one place in the graph means it is enabled everywhere, so the log crate itself says it should not be used by library crates.

This does mean, though, that any tool using write-fonts has a simple way of ensuring no logging ends up in the final binary, which solves the underlying issue this is tracking.

@cmyr cmyr closed this as completed May 23, 2023
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

2 participants