Skip to content
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

Enforcer doesn't respect enable_log #319

Closed
cp-weng-tkspring opened this issue Sep 22, 2023 · 2 comments · Fixed by #321
Closed

Enforcer doesn't respect enable_log #319

cp-weng-tkspring opened this issue Sep 22, 2023 · 2 comments · Fixed by #321
Assignees
Labels
enhancement New feature or request

Comments

@cp-weng-tkspring
Copy link

cp-weng-tkspring commented Sep 22, 2023

Sample code

e = casbin.Enforcer(model, enable_log=False)
e.enforce(...)

Expected behavior

Nothing printed

Actual behavior

When the request doesn't pass, a log will be printed out:

Request: foo_sub, foo_obj, foo_act ---> False

Current workaround

e.logger.disabled = True
@casbin-bot
Copy link
Member

@techoner @Nekotoxin

@casbin-bot casbin-bot added the enhancement New feature or request label Sep 22, 2023
@hsluoyz
Copy link
Member

hsluoyz commented Sep 22, 2023

@BustDot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants