INNER CODE UNIT · Go

newAuditLogger

minio/kes · audit.go:135

func newAuditLogger(h AuditHandler, level slog.Leveler) *auditLogger {
	return &auditLogger{
		h:     h,
		level: level,
		out:   &api.Multicast{},
	}
}

// Log emits an audit record with the current time, log message,
// response status code and request information.
func (a *auditLogger) Log(msg string, statusCode int, req *api.Request) {
	const Level = slog.LevelInfo
	if Level < a.level.Level() {
		return
	}

	hEnabled, oEnabled := a.h.Enabled(req.Context(), Level), a.out.Num() > 0
	if !hEnabled && !oEnabled {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…