File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -248,9 +248,10 @@ def _initialize_enforcer(cls) -> SyncedEnforcer:
248248 # Avoid circular import
249249 from openedx_authz .engine .matcher import is_admin_or_superuser_check # pylint: disable=import-outside-toplevel
250250
251- # Silence verbose casbin policy logging BEFORE creating the enforcer
252- # to prevent print_policy() from showing during initialization
251+ # Configure logging BEFORE initialize_enforcer() because it creates a ProxyEnforcer
252+ # that doesn't pass logging config and would use Casbin's defaults
253253 logging .getLogger ("casbin.policy" ).setLevel (logging .WARNING )
254+ logging .getLogger ("casbin.role" ).setLevel (logging .WARNING )
254255
255256 db_alias = getattr (settings , "CASBIN_DB_ALIAS" , "default" )
256257
You can’t perform that action at this time.
0 commit comments