pact-foundation / pact-mock_service

Provides a mock service for use with Pact
https://pact.io
MIT License
73 stars 69 forks source link

Feature Request: Adding LogLevel CLI argument for logging #91

Closed cwilliamson226 closed 6 years ago

cwilliamson226 commented 6 years ago

Hi all,

I recently started using pact-mock-service in my project, but after originally using pact.js and switching to the mock-service standalone, I realized that not being able to choose the log-level is a little annoying.

For example, I have some interactions registered that return large-scale JSON objects back to the client, so when I'm trying to debug other interactions that aren't working correctly, I have to scroll through a massive amount of useless lines just logging the interaction response via DEBUG.

I'm going to take a look at the source code to see if I can figure out how I can change it and if so, I'll commit it and send a PR to the main repo if you guys agree on the feature. However, I've never used Ruby before and don't really know how much effort it might be to implement something like that.

This is my first time doing a feature request on a github project, so I'm not really sure what else to add, but if anyone has tips or wants to help, just let me know!

bethesque commented 6 years ago

I was going to explain how to do it, and then it was just quicker to do it myself! I've been meaning to expose that setting for ages, and just never got around to it. The pact-node needs to be updated to pull in the new CLI now.

cwilliamson226 commented 6 years ago

Awesome, thanks for the quick help!