crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Add a `--debug` or similar CLI option to avoid needing envvars

Open benjie opened this issue 6 years ago • 2 comments

I'm not completely sure what options to include, or how to express them. I was considering making it a level like --verbosity error, 'warn', 'info', 'debug', 'excessive'. Or maybe a numeric value like --debug 9. Or maybe a string of keywords like --debug sql,errors,plugins,.... It needs to be intuitive or be able to be documented trivially in --help.

benjie avatar Jul 17 '18 19:07 benjie

A number of users have expressed they find it hard to debug errors because they can't see the errors within the client and the server doesn't log them. A debug mode that outputs the input and output from PostGraphile would be helpful. Level one: queries, level 2: queries + errors, level 3: queries + errors + data, level 4: queries + errors + data + headers.

benjie avatar Jul 17 '18 19:07 benjie

@benjie what Are there env vars that can be set currently to enable server error logging? Found em: https://www.graphile.org/postgraphile/debugging/#debugging

tnrich avatar Apr 29 '19 21:04 tnrich