From 98d39d8d7a50d13b3bcf17acf7a589da61044e3f Mon Sep 17 00:00:00 2001 From: Asa Sprow Date: Tue, 24 Feb 2026 18:49:44 -0700 Subject: [PATCH] feat: add debugLog parameters to DistributedEnforcer constructors --- .../jcasbin/main/DistributedEnforcer.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java b/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java index d057908c..639dc476 100644 --- a/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java +++ b/src/main/java/org/casbin/jcasbin/main/DistributedEnforcer.java @@ -97,6 +97,28 @@ public DistributedEnforcer(String modelPath, String policyFile, boolean enableLo super(modelPath, policyFile, enableLog); } + /** + * DistributedEnforcer initializes an enforcer with a database adapter and an enable log flag. + * + * @param modelPath the path of the model file. + * @param adapter the adapter. + * @param enableLog whether to enable Casbin's log. + */ + public DistributedEnforcer(String modelPath, Adapter adapter, boolean enableLog) { + super(modelPath, adapter, enableLog); + } + + /** + * DistributedEnforcer initializes an enforcer with a model, a database adapter and an enable log flag. + * + * @param m the model. + * @param adapter the adapter. + * @param enableLog whether to enable Casbin's log. + */ + public DistributedEnforcer(Model m, Adapter adapter, boolean enableLog) { + super(m, adapter, enableLog); + } + /** * AddPolicySelf provides a method for dispatcher to add authorization rules to the current policy. * The function returns the rules affected and error.