-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Wrong Log Level when writing json file #10
Comments
Unfortunately this is just how the underlying Ruby process works, it was certainly confusing to me at first (also requiring some coding gymnastics to interpret actual errors!). This seems to be a common thing in other Pact implementations also (at least in Java). I'll ask some others in the Pact community to get a better understanding. |
I don't think it's the ruby. Here's the code. def write_pact_if_configured
consumer_contract_writer = ConsumerContractWriter.new(@session.consumer_contract_details, StdoutLogger.new)
consumer_contract_writer.write if consumer_contract_writer.can_write?
end
# Can't write to a file in a TRAP, might deadlock
class StdoutLogger
def info message
$stdout.puts "\n#{message}"
end
end
end def update_pactfile
logger.info log_message
...
end
def log_message
if updating?
"Updating pact for #{provider_name} at #{pactfile_path}"
else
"Writing pact for #{provider_name} to #{pactfile_path}"
end
end |
Thanks Beth, I'm digging into this again just now. |
That fix now does imply that we get an |
Running on Mac OS the Pact daemon with no arguments we get this output:
I've replaced some sensitive info with , and .
The json file gets written properly so functionally it's fine. The
[ERROR]
is probably just the wrong log level.The text was updated successfully, but these errors were encountered: