question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to get the debug logs or python stacktrace on errors even after LOG_LEVEL is set to 'DEBUG'

See original GitHub issue

Make sure these boxes are checked before submitting your issue - thank you!

  • [can’t find the stacktrace ] I have checked the superset logs for python stacktraces and included it here as text if any
  • [check ] I have reproduced the issue with at least the latest released version of superset
  • [ check] I have checked the issue tracker for the same issue and I haven’t found one similar

I’m using the following 2 parameters to define the log level of superset

LOG_FORMAT = ‘%(asctime)s:%(levelname)s:%(name)s:%(message)s’ LOG_LEVEL = ‘DEBUG’

But when I start superset using superset runserver, I cannot see the debug logs (or python stacktrace on errors) on the console. I’m trying to login to superset using LDAP, but not able to do so, and hence need the debug logs/python stacktrace. Can someone please help me out.

Superset version

0.24.0 superset.txt

Expected results

Debug logs on the console

Actual results

Info logs on the console superset_log_issue

Steps to reproduce

The config file is attached. When I try to login, the login fails and I get the following message

Invalid login. Please try again.

and there is no debug log on the console.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
us3rcommented, Apr 12, 2018

@deepak-goel could you share with your pip freeze results? I have the same problem and adding public role doesnt solve my issue. I am still not able to check if my LDAP configuration works. So, to better understand… after such configuration - should I register a new user (where username == uid from LDAP)?

EDIT: I checked BaseSecurityManager line by line and in my case that solved the issue:AUTH_LDAP_USERNAME_FORMAT = "uid=%s,ou=YOUR,o=ORG"

1reaction
deepak-goelcommented, Apr 11, 2018

I got this working. I added the following 3 parameters

AUTH_USER_REGISTRATION = True AUTH_ROLE_PUBLIC = 'Public' AUTH_USER_REGISTRATION_ROLE = 'Public'

Superset config specifically needs the user registration as True for any user that logs in the first time. Closing this issue now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I log a Python error with debug information?
Save this answer. Show activity on this post. If "debugging information" means the values present when exception was raised, then logging. exception(...)
Read more >
Logging HOWTO — Python 3.11.1 documentation
In this case, because we set the threshold to DEBUG , all of the messages were printed. If you want to set the...
Read more >
Exceptional Logging of Exceptions in Python - Loggly
Just notice that the first line is the message you passed to logger. exception() , and the subsequent lines are the full stack...
Read more >
The Ultimate Guide to Logging in Python - Rollbar
This logger can be used to write formatted messages using a log level (DEBUG, INFO, ERROR etc). Here's an example:
Read more >
How to Get Started with Logging in Python - Better Stack
Generally, these are the meanings behind each log level: DEBUG : used to give a detailed report about an event, especially when diagnosing ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found