MCPcopy
hub / github.com/apache/casbin / SetLogCallback

Method SetLogCallback

log/default_logger.go:108–111  ·  view source on GitHub ↗

SetLogCallback sets a user-provided callback function. The callback is called at the end of OnAfterEvent.

(callback func(entry *LogEntry) error)

Source from the content-addressed store, hash-verified

106// SetLogCallback sets a user-provided callback function.
107// The callback is called at the end of OnAfterEvent.
108func (l *DefaultLogger) SetLogCallback(callback func(entry *LogEntry) error) error {
109 l.logCallback = callback
110 return nil
111}
112
113// writeLog writes the log entry to the configured output.
114func (l *DefaultLogger) writeLog(entry *LogEntry) error {

Callers 2

TestSetEventTypesFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestSetEventTypesFunction · 0.76