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

[logging] Re-use 'verbose' to reduce logging output during runs #319

Closed
wants to merge 1 commit into from

Conversation

hazendaz
Copy link

I did look around and did not see any reports of wanting this data entirely hidden. This PR doesn't solve needs completely and probably needs another field to handle this as I'm mixing its usage with verbose. Maybe something with logging level here might do it.

Currently logging on this plugin is mostly in 'info' mode making it incredibility chatty with zero value in the data posted. This becomes worse during multi module builds that is aggregated and constantly replacing attached data. This PR won't solve all instances but will make a good attempt at reducing the output.

After reuse of 'verbose' here, when false which is default and may require some other way to achieve this would result in this.

[INFO] --- cyclonedx:2.7.6-SNAPSHOT:makeBom (default) @ antisamy ---
[WARNING] Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword

I'd love to get that other warning to go away too but that is in cyclonedx and doesn't seem it can be hidden. How might we hid that too?

By default, normal plugin run gets this

[INFO] CycloneDX: Resolving Dependencies
[INFO] CycloneDX: Creating BOM version 1.4 with 18 component(s)
[INFO] CycloneDX: Writing and validating BOM (XML): C:\Users\Jeremy\GitHub\antisamy\target\bom.xml
[INFO]            attaching as antisamy-1.7.3-SNAPSHOT-cyclonedx.xml
[INFO] CycloneDX: Writing and validating BOM (JSON): C:\Users\Jeremy\GitHub\antisamy\target\bom.json
[WARNING] Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[INFO]            attaching as antisamy-1.7.3-SNAPSHOT-cyclonedx.json

Because I reused 'verbose' here as it made sense to do, turning that on would get the following.

[INFO] --- cyclonedx:2.7.6-SNAPSHOT:makeBom (default-cli) @ antisamy ---
[INFO] CycloneDX: Parameters
[INFO] ------------------------------------------------------------------------
[INFO] schemaVersion          : 1.4
[INFO] includeBomSerialNumber : true
[INFO] includeCompileScope    : true
[INFO] includeProvidedScope   : true
[INFO] includeRuntimeScope    : true
[INFO] includeTestScope       : false
[INFO] includeSystemScope     : true
[INFO] includeLicenseText     : false
[INFO] outputFormat           : all
[INFO] outputName             : bom
[INFO] ------------------------------------------------------------------------
[INFO] CycloneDX: Resolving Dependencies
[INFO] CycloneDX: Creating BOM version 1.4 with 18 component(s)
[INFO] CycloneDX: Writing and validating BOM (XML): C:\Users\Jeremy\GitHub\antisamy\target\bom.xml
[INFO]            attaching as antisamy-1.7.3-SNAPSHOT-cyclonedx.xml
[INFO] CycloneDX: Writing and validating BOM (JSON): C:\Users\Jeremy\GitHub\antisamy\target\bom.json
[WARNING] Unknown keyword additionalItems - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
[INFO]            attaching as antisamy-1.7.3-SNAPSHOT-cyclonedx.json

I can see using a separate flag but wanted to get feedback first. Also suggestions on how to squash warning shown above as well as when multi module build and it states it already seen the creation and creates a new one to attach (replaces), how might that be squashed too?

Ideally I would want to run this without any data output at all since no data it outputs IMHO is something I want to see outside of debug run since its value at best is redundant. Of course it creates those files, that was the point, of course they are in target, again the point.

@hboutemy
Copy link
Contributor

warning has been reported as #305

on reducing even more the info output:

  1. I dislike having 0 output: no output means the goal does nothing
  2. the simplification (and count of components) already done in streamline plugin output #304 has not been released yet: I'm eager to see feedback from that first step

I suggest that we see feedback from users after 2.7.6 release before going even further

@hazendaz
Copy link
Author

hazendaz commented Mar 24, 2023 via email

@hboutemy
Copy link
Contributor

I'm trying to have it released soon, even if we know some limitations that will take more time to fix

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