Verbose logging
User story. As a Prism CLI user, I can supply --verbose (or --debug) CLI option, so that I can see more verbose logs.
Is your feature request related to a problem? There are occasions when I do not have easy access to request or response payload. For those cases, it would be helpful if I could see the actual request and response payloads together with headers. That should help me debug possible problems with spec or request data.
Describe the solution you'd like
A -d|--debug or --verbose CLI option which enables the above functionality.
Additional context This could be also super helpful in debugging callbacks, which are performing asynchronous request based on previous req/res pair.
Aha! I can understand the frustration while debugging the thing.
I think we have two steps here to do:
- Logging the things that we need
- Forward the filtering capabilities to Pino
Right now we have already several log levels that come bundled with pino
trace, debug, info, warn, error, and fatal.
On top of these, we add some other that are used just for beautifying purposes:
note, success, start
I've prepared #780 to clean up some stuff that effectively does not make much sense anymore and inject the custom logging logic in the CLI instead of keeping them in the main package.
Once such PR is merged we can log the stuff you think it's important, review the levels and then the filtering capability.
In progress https://github.com/stoplightio/prism/pull/801
Hey all, wanted to check to see if this feature is still in progress? It looks like it had some momentum during the winter but fell off. Is this still planned? Would love to be able to use this.
Yeah we have paused working on this for two reasons:
- We are busy on doing something else and this feature is not exactly that critical
- We are generally rethinking a little bit the way we do logging and it is kind of probably that we are going to change the way we output messages (specifically speaking, changing the abstraction from
ReaderTaskEitherto aWriter<TaskEither>>— but we still need to check out if it's worth doing and makes sense for real.
Logging correctly is hard — that's for sure.
@XVincentX how's this one come along? Is it going to happen or should we close it down?
I do not think this is gonna happen anytime soon, but the content is still valid.
@ryotrellim hey would you like to close this or prioritise it? It’s been around a while but could be helpful.
@XVincentX and other maintainers – I'm interested in having someone on my team put up a PR for this early next week. Any tips/pointers/thoughts on how to get started or what you would like to see from it?
I no longer work at Stoplight. You might want to mention somebody else to get attention!
@XVincentX hey fella, thanks for pinging this onto my inbox! 🙌🏻
@rattrayalex could you hop onto the community discord where you can chat with some of the other Prism developers?
https://discord.gg/stoplight
If you don’t use discord no worries, I can share this with some of the team.
Sorry to bother you Vincenzo!
Thanks Phil, I'll try to join, and my teammate @gleich may join as well (he's most likely to be the one to work on this).
Hey everyone! I just joined the discord. Where are you guys planning on talking about this?