MCPcopy Index your code
hub / github.com/apache/casbin / onLogAfterEventWithError

Method onLogAfterEventWithError

util_log.go:42–47  ·  view source on GitHub ↗

onLogAfterEventWithError calls OnAfterEvent with an error if logger and logEntry exist.

(logEntry *log.LogEntry, err error)

Source from the content-addressed store, hash-verified

40
41// onLogAfterEventWithError calls OnAfterEvent with an error if logger and logEntry exist.
42func (e *Enforcer) onLogAfterEventWithError(logEntry *log.LogEntry, err error) {
43 if e.logger != nil && logEntry != nil {
44 logEntry.Error = err
45 _ = e.logger.OnAfterEvent(logEntry)
46 }
47}
48
49// countModelRules counts the total number of rules in a model's p and g sections.
50func countModelRules(m model.Model) int {

Callers 2

LoadPolicyMethod · 0.95
SavePolicyMethod · 0.95

Calls 1

OnAfterEventMethod · 0.65

Tested by

no test coverage detected