-
Notifications
You must be signed in to change notification settings - Fork 46
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: reduce log level for matching to debug #454
Conversation
some other places noted from pact-foundation/pact-js#1114 it’s here here The debug values captured for the incoming and outgoing requests are useful and could be captured for sending in case of failure. and here pact-reference/rust/pact_matching/src/lib.rs Line 1665 in efc54d2
There are other instances of info! statements
I think lib authors can suppress log output by piping to a buffer (or file) and reading from there if necessary (fetch_log_buffer_as_json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could capture additional info statements found here, in this PR if you wanted to, although they cross crates
https://github.com/search?q=repo%3Apact-foundation%2Fpact-reference+info%21&type=code
Good shout, they look like decent targets to switch to Pact JS was one of the earlier adopters and we were toying with various output options. Resolving pact-foundation/pact-js-core#428 will go some way to making this less relevant in the JS use case. |
The other option is if you don't want to see INFO level logs, then don't set the logging to INFO. Set it to WARN. |
this is pretty much ready to go pact-foundation/pact-js-core#428 however it is a pain to test as when the ffi lib is started and you set a log sink, you can't change it, so it logs to stdout/buffer or file. it's the cause of noise in the pact-go and js logs about the ffi already being initialised and a log level is already set, so cannot set a new level Not sure if we can setup multiple? Also it would actually be nice if we could control the log level per test, but that currently isn't possibly. I would find maybe being able to log per test more useful that a massive log dump in a file. makes the haystack smaller if something does go wrong, as no-one wants to go sifting through logs unless there is a really good key that you can reliably search on. |
The additional noise in the logs at
info
level is not needed and interferes with standard out (e.g. test output), and is more appropriate fordebug
level.