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

fix(logging): respect log levels for skipped files #102

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

CalebAlbers
Copy link
Member

🛠️ Description

Previously, the copywrite headers command would output a lot of [DEBUG] skipping file... statements, esp. when large folders were excluded (looking at you, NODE_MODULES). This made for a poor experience, and was a bug introduced when I made #80 - as in an attempt to fix an issue with GHA log group directives and addlicense sending to stdout and stderr, respectively, I introduced a bug that ignored the COPYWRITE_LOG_LEVEL env var.

This PR fixes that error while ensuring the GHA log grouping still works by redirecting the cliLogger we use throughout the headers cmd (and others) to stdout by default. This doesn't appear to be a large shift or change for other commands, but does make a big difference for the headers command.

👍 Definition of Done

  • New functionality works?

🤔 Can be merged upon approval?

Previously, the `copywrite headers` command would output a lot of `[DEBUG] skipping file...` statements, esp. when large folders were excluded (looking at you, `NODE_MODULES`). This made for a poor experience, and was a bug introduced when I made #80 - as in an attempt to fix an issue with GHA log group directives and addlicense sending to stdout and stderr, respectively, I introduced a bug that ignored the `COPYWRITE_LOG_LEVEL` env var.

This PR fixes that error while ensuring the GHA log grouping still works by redirecting the `cliLogger` we use throughout the headers cmd (and others) to stdout by default. This doesn't appear to be a large shift or change for other commands, but does make a big difference for the headers command.
@CalebAlbers CalebAlbers requested review from a team, emilymianeil and jeanneryan and removed request for a team November 7, 2023 20:16
@CalebAlbers
Copy link
Member Author

Thanks for reporting the bug, @zofskeez!

@dlaguerta dlaguerta self-requested a review November 13, 2023 18:23
@CalebAlbers CalebAlbers merged commit 9f8cdf2 into main Nov 13, 2023
5 checks passed
@CalebAlbers CalebAlbers deleted the respect-log-levels-on-headers-cmd branch November 13, 2023 19:40
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

Successfully merging this pull request may close these issues.

2 participants