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

Method onLogAfterEventInLoadPolicy

util_log.go:71–76  ·  view source on GitHub ↗

onLogAfterEventInLoadPolicy finalizes logging for LoadPolicy operation with rule count.

(logEntry *log.LogEntry, newModel model.Model)

Source from the content-addressed store, hash-verified

69
70// onLogAfterEventInLoadPolicy finalizes logging for LoadPolicy operation with rule count.
71func (e *Enforcer) onLogAfterEventInLoadPolicy(logEntry *log.LogEntry, newModel model.Model) {
72 if e.logger != nil && logEntry != nil {
73 logEntry.RuleCount = countModelRules(newModel)
74 _ = e.logger.OnAfterEvent(logEntry)
75 }
76}
77
78// onLogBeforeEventInSavePolicy initializes logging for SavePolicy operation with rule count.
79func (e *Enforcer) onLogBeforeEventInSavePolicy() *log.LogEntry {

Callers 1

LoadPolicyMethod · 0.95

Calls 2

countModelRulesFunction · 0.85
OnAfterEventMethod · 0.65

Tested by

no test coverage detected