Casbin Forum runs on Casnode, the open-source Discourse-style forum. Try the Casnode demo →
Casbin Forum

Hi, I noticed there is no way to provide a custom logger to the casbin enforcer other than redefining a casbin.log.Logger completely, as the casbin DefaultLogger always uses the default Logger from std lib. Would a PR on being able to pass a log.Logger to the DefaultLogger (and use the std lib if no Logger is provided) and use it be accepted ?

1views
2users
1 minread

sounds ok if your change doesn't affect the current default behavior

Submitted the PR. I added a refactor for Enforcer creation, current function is pretty ugly. Feel free to suggest edits

1 / 3
Dec 2024