dredd-hooks-python icon indicating copy to clipboard operation
dredd-hooks-python copied to clipboard

Print more startup information

Open martijnarts opened this issue 7 years ago • 2 comments

I'm not sure how you feel about reporting from hook libraries, so feel free to turn this one down. Just added it since this helped me a lot with debugging the last few issues.

It might be useful instead to use logging and accept an additional --level argument from Dredd, to keep the same (or a similar) log level across Dredd and its hooks?

martijnarts avatar Mar 21 '17 12:03 martijnarts

Yeah, I've done this too but never pushed the code. I might make sense to have a general Dredd flag like --debug or --verbose for all hook handlers so you can request detailed logging form the handler. It is very useful when debugging hook file issues but once hooks are in place it just clutters the output. @honzajavorek What do you think?

w-vi avatar Mar 21 '17 13:03 w-vi

I think it is a good idea in general, but if it's something to be supported widely in Dredd, it needs to go through https://github.com/apiaryio/dredd-hooks-template, preferably tested first :)

There are some changes going on which are basically trying to change hook handlers in a way Dredd could pass options to them (not only a list of files), so once that is sorted out, I think it will be very simple to add one more useful option to the mix. However, until that underlying work is done, I would wait with this.

Still, the time can be used for writing tests for the test suite in the https://github.com/apiaryio/dredd-hooks-template and polishing details on how this should work 👍

honzajavorek avatar Mar 24 '17 08:03 honzajavorek