mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-09 12:21:57 -04:00
add code to log all SQL queries for DEBUG
This commit is contained in:
parent
385ccaa14d
commit
9adfe0e2e6
1 changed files with 5 additions and 6 deletions
|
@ -65,14 +65,13 @@ else:
|
|||
# print(f'[!] WARNING: data/logs dir does not exist. Logging to temp file: {ERROR_LOG}')
|
||||
pass
|
||||
|
||||
LOG_LEVEL_DATABASE = 'WARNING'
|
||||
LOG_LEVEL_DATABASE = 'WARNING' # change to DEBUG to log all SQL queries
|
||||
LOG_LEVEL_REQUEST = 'WARNING' # if DEBUG else 'WARNING'
|
||||
|
||||
# UNCOMMENT TO LOG ALL SQL QUERIES:
|
||||
# LOG_LEVEL_DATABASE = 'DEBUG'
|
||||
# db_logger = logging.getLogger('django.db.backends')
|
||||
# db_logger.setLevel(logging.DEBUG)
|
||||
# db_logger.addHandler(logging.StreamHandler())
|
||||
if LOG_LEVEL_DATABASE == 'DEBUG':
|
||||
db_logger = logging.getLogger('django.db.backends')
|
||||
db_logger.setLevel(logging.DEBUG)
|
||||
db_logger.addHandler(logging.StreamHandler())
|
||||
|
||||
|
||||
SETTINGS_LOGGING = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue