Skip to content

Commit

Permalink
feat: disable logger when log is not enabled (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
BustDot authored Sep 23, 2023
1 parent 955d2de commit 952c208
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions casbin/core_enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def __init__(self, model=None, adapter=None, enable_log=False):

if enable_log:
configure_logging()
else:
logging.disable(logging.CRITICAL)

def init_with_file(self, model_path, policy_path):
"""initializes an enforcer with a model file and a policy file."""
Expand Down

0 comments on commit 952c208

Please sign in to comment.