Skip to content

Commit 22c49db

Browse files
authored
fix: Fix compatibility with Casbin v2.75.0 (#5)
1 parent 51664be commit 22c49db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

logger.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,11 @@ func (l *Logger) LogRole(roles []string) {
155155

156156
l.logger.Info("LogRole", zap.Strings("roles", roles))
157157
}
158+
159+
func (l *Logger) LogError(err error, msg ...string) {
160+
if !l.IsEnabled() {
161+
return
162+
}
163+
164+
l.logger.Error("LogError", zap.Error(err), zap.Strings("msg", msg))
165+
}

0 commit comments

Comments
 (0)