Debug mode for seahub?

Is there a debug mode available for seahub which gives a more detailed log information?

just find it by myself maybe have other option…
but here is also good enough to have more informaiton
vim /seafile/seafile-server-latest/seahub/seahub/settings.py
edit this file and go to the logging section
replace all the INFO to DEBUG

also you can add more log in nginx if you are using it.

Blockquote
# Logging
LOGGING = {
‘version’: 1,

    # Enable existing loggers so that gunicorn errors will be bubbled up when
    # server side error page "Internal Server Error" occurs.
    # ref: https://www.caktusgroup.com/blog/2015/01/27/Django-Logging-Configuration-logging_config-default-settings-logger/
    'disable_existing_loggers': False,

    'formatters': {
        'standard': {
            'format': '%(asctime)s [%(levelname)s] %(name)s:%(lineno)s %(funcName)s %(message)s'
        },
    },
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        },
        'require_debug_true': {
            '()': 'django.utils.log.RequireDebugTrue'
        },
    },
    'handlers': {
        'console': {
            **'level': 'DEBUG',**
            'filters': ['require_debug_true'],
            'class': 'logging.StreamHandler',
            'formatter': 'standard',
        },
        'default': {
            #'level': 'INFO',
            **'level': 'DEBUG',**
            'class': 'logging.handlers.RotatingFileHandler',
            'filename': os.path.join(LOG_DIR, 'seahub.log'),
            'maxBytes': 1024*1024*100,  # 100 MB
            'backupCount': 5,
            'formatter': 'standard',
        },
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        '': {
            'handlers': ['default'],
            #'level': 'INFO',
            **'level': 'DEBUG',**
            'propagate': True
        },
        'django.request': {
            'handlers': ['default', 'mail_admins'],
            #'level': 'INFO',
            'level': 'DEBUG',
            'propagate': False
        },
        'py.warnings': {
            'handlers': ['console', ],
            #'level': 'INFO',
            'level': 'DEBUG',
            'propagate': False
        },
    }
1 Like