-
Notifications
You must be signed in to change notification settings - Fork 9
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
Explore ERROR log lines from Apache Commons JCS #78
Comments
Or set its level to FATAL 😄 |
Ok, I looked at the clj-watson code. It is not closing the dependency-check Engine, and it probably should be. If I close the Engine, the error appears sooner. But I also googled and the opinion over at dependency-check is that this error should be debug level. jeremylong/DependencyCheck#6073 Looking at the JCS code, I agree, it doesn't seem worthy to wail so loudly about this. So, I'll:
|
Sounds good. Thanks for doing all that digging! |
Options for log message suppression:
Thoughts and ProposalIf we already had a precompile requirement, options 3 and 4.1 would not seem terrible, but we don't, so I'd rather not suggest introducing such a requirement. A security tool should avoid bringing in deps if it can, so I'm not crazy about option 2. Re option 4.2: Since clj-watson is a tool and not a lib, I don't see a big issue with the coupling to logback for logging. If you agree with my analysis above, we have a choice between options 2 and 4.2. |
I should address closing the Engine as a separate issue. I'll create one. |
Option 5: Leave it as-is, just like DependencyCheck does, and document that this is a spurious/harmless error. I think 4.2 (or 5) are both fine. I think 2 is overkill just to get rid of a spurious error in the logs. Either way, I consider this low priority so I'd lean to option 5 for now. |
Seeing three ERROR lines output every time I run clj-watson is pretty bad. I'll try to make my case:
Whatcha think? Are you ok with me trying out 4.2? |
Yup, I said 4.2 was okay by me. Create a chore issue as a placeholder for that error message having its severity lowered at some point, and then we could take out the programmatic suppression. |
Cool, you were leaning toward 5 so I felt sharing my rationale had merit. |
Here's the Apache Commons JCS issue tracker: https://issues.apache.org/jira/projects/JCS/issues/?filter=allissues |
There's at least one issue in there discussing the log level of another component, but I couldn't find anything about this IndexedDiskCache logging. I just offered up 5 as a do-nothing option. If 4.2 is straightforward, that's fine. The other options, not so keen... |
I just tried the latest SHA from the main branch and ran into a problem: I had excluded slf4j-nop and added all the log4j2 bridging stuff and this code failed because:
We might want to either wrap that in a try/catch (fallback: the jcs logging won't be suppressed) and/or add a note to the documentation about expected usage around logging? Here's what I had initially: :watson
{:replace-deps {io.github.clj-holmes/clj-watson
{:git/tag "v5.1.3" :git/sha "5812615"
:exclusions [org.slf4j/slf4j-nop]}
org.owasp/dependency-check-core {:mvn/version "RELEASE"}
;; use log4j 2.x:
org.apache.logging.log4j/log4j-api {:mvn/version "2.23.1"}
;; bridge into log4j:
org.apache.logging.log4j/log4j-1.2-api {:mvn/version "2.23.1"}
org.apache.logging.log4j/log4j-jcl {:mvn/version "2.23.1"}
org.apache.logging.log4j/log4j-jul {:mvn/version "2.23.1"}
org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.23.1"}
org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.23.1"}} and here's what I have now: :watson
{:replace-deps {io.github.clj-holmes/clj-watson
{;; :git/tag "v5.1.3" :git/sha "5812615"
;; unreleased next version:
:git/sha "20b42599320fc30491a7b9a6ef1dc69b75a19799"}
org.owasp/dependency-check-core {:mvn/version "RELEASE"}} |
Ah OK, interesting @seancorfield, you were excluding slf4j-nop and adding your own deps so that you could see the missing suppressed logs? The con I listed for option 4.2 was:
But also slf4j... |
Thanks. Yeah, I don't suppose many users had gone down my path :) |
It's the path I would have taken too, @seancorfield. It was way too quiet! |
Actually @seancorfield your logging failure drove home that we did favour complecting over bringing the new dep on Janino. |
Recently
We enabled console logging (it was previously entirely suppressed) and then we suppressed the noisy INFO level errors for Apache Commons JCS by setting its min log level to
warn
.But
On after clj-watson completes a dependency-check scan I see the following
error
log lines from JCS on termination:So...
I'll explore. Maybe dependency-check is doing something JCS finds objectionable, or maybe clj-watson is.
The text was updated successfully, but these errors were encountered: