-
Notifications
You must be signed in to change notification settings - Fork 2
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
1.1.5: Remove #error {
line from fatal logs
#16
Conversation
…st tests to do true output checking
If log4j is not found (aka
In usage where slf4j is present:
After:
|
Having trouble with the unit test not rebinding err and capturing the output when run from the CLI (it works in the REPL), so I'm considering just relying on manual integration testing here. After some review, this is a more simplified form of the output with info fixed to include the namespace.
|
…d reduce redundancy of datetimes.
This is the final version. Will run it through and confirm that the code as-is matches my most recent comment. There was a strange issue with capture stderr in the unit tests where the re-binding worked in the repl, but not on the command line. Given that log testing (unit form) is slightly brittle and explicit, I decided they were providing negative value and removed them. |
Here's the final version, with a debug level that's not getting logged (since there's no debug logger defined in log4j) and all the visible log levels.
|
Description of change
The current pattern of logging is showing a dangling
#error {
line when theFATAL
log lines are parsed out of projects that use this library (e.g., taps' top-level error handler and Stitch's failure message). This provide no value, and is just clutter in the message, causing confusion.The lines that follow this are the stack trace and are definitely not an error summary, so this PR makes those non-fatal level to keep them out of the exit reason.
Due to slf4j being a hard requirement of a lot of Java libraries (specifically,
apache/avro
for our purposes), those taps do not have a FATAL level, since that's not present in slf4j (at least not fromclojure.tools.logging
). This PR takes advantage of the dynamic binding of*logger-factory*
provided byclojure.tools.logging
to explicitly use log4j as has been the case for our Clojure taps up until thisslf4j
dependency was forced upon us.This allows the clojure-level to use the logger that we have been using, while allowing libraries to use their own. The downside is that
log4j
is now an explicit dependency requirement for users of this library, but it was before, it'll just now check through thedelay
binding inlog.clj
.Manual QA steps
Risks
Rollback steps