astro-sdk icon indicating copy to clipboard operation
astro-sdk copied to clipboard

Allow users to enable SQL CLI debug mode

Open tatiana opened this issue 3 years ago • 0 comments

Please describe the feature you'd like to see

By default, we want the SQL CLI commands to return very clean and tidy outputs so the end-users don't feel overwhelmed. However, we also understand more advanced users would like to see the full logs.

Describe the solution you'd like We'd like to have a flag --debug which will export logs to both to a directory .logs in the root of the project and also print in the stdout. We should also allow users to configure the LOG level they are interested in. This may be done in our configuration or Airflow configuration.

Are there any alternatives to this feature? Using environment variables/airflow configuration.

Additional context This issue popped up during the implementation of ticket #941

Acceptance Criteria

  • [ ] By default, debug is enabled, and we only see the clean output
  • [ ] If debug is enabled, we should see INFO logs
  • [ ] All checks and tests in the CI should pass
  • [ ] Unit tests (90% code coverage or more, once available)
  • [ ] Integration tests (if the feature relates to a new database or external service)
  • [ ] Example DAG
  • [ ] Docstrings in reStructuredText for each of the methods, classes, functions and module-level attributes (including Example DAG on how it should be used)
  • [ ] Exception handling in case of errors
  • [ ] Logging (are we exposing useful information to the user? e.g. source and destination)
  • [ ] Improve the documentation (README, Sphinx, and any other relevant)
  • [ ] How to use Guide for the feature (example)

tatiana avatar Oct 11 '22 11:10 tatiana