-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: allow logs to show error levels for ssh tunnel #23536
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23536 +/- ##
===========================================
+ Coverage 56.48% 67.66% +11.18%
===========================================
Files 1914 1914
Lines 73926 73919 -7
Branches 8020 8018 -2
===========================================
+ Hits 41758 50020 +8262
+ Misses 30125 21856 -8269
Partials 2043 2043
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 302 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
superset/extensions/ssh.py
Outdated
"local_bind_address": (self.local_bind_address,), | ||
"debug_level": "ERROR", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to set this to the current log level of Superset, so that in production this is ERROR
, but in dev this is DEBUG
or INFO
, eg.
You should be able to get the current log level with something like:
logging.getLogger("flask_appbuilder").level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I think logging.getLogger("flask_appbuilder").level
is an int, you probably need to convert to a string here. Looks like you can do something like this:
log = logging.getLogger("flask_appbuilder")
str_level = logging.getLevelName(log.getEffectiveLevel())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the package handles int as well
(cherry picked from commit 81b32d1)
SUMMARY
allow debug level logs to show all error from the internal package
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION