From 43eeaf9bd72eb72e0e9ade73c6041f1fd0a87469 Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Fri, 12 Jul 2024 22:28:55 -0700 Subject: chore: add debugging --- internal/admin/service.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/admin/service.go b/internal/admin/service.go index c1082d5..4f955da 100644 --- a/internal/admin/service.go +++ b/internal/admin/service.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log/slog" + "strconv" casbin "github.com/casbin/casbin/v2" ) @@ -43,6 +44,7 @@ func (s *Servicer) Reload() { func (s *Servicer) InitServer() error { policies := s.Conf.ServerPolicies() numAdded := 0 + slog.Debug(fmt.Sprintf("number of repos %s", strconv.Itoa(len(s.Conf.Repos)))) for _, policy := range policies { added, err := s.AddPolicy(policy[0], policy[1], policy[2]) if err != nil { @@ -76,6 +78,7 @@ func NewService(modelPath, policyPath, serverConfigPath, reposDir string, mgmtRe if err != nil { return &Servicer{}, err } + slog.Debug(fmt.Sprintf("policy path %s", workingPolicyPath)) enf, err := casbin.NewSyncedEnforcer(modelPath, workingPolicyPath) if err != nil { return &Servicer{}, fmt.Errorf("Couldn't load the enforcer encountered the following error: %w", err) -- cgit v1.2.3