INNER CODE UNIT · Go

func

minio/kes · audit.go:145

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 {
		return
	}

	now := time.Now()
	remoteIP, _ := netip.ParseAddrPort(req.RemoteAddr)
	r := AuditRecord{
		Time:         time.Now(),
		Method:       req.Method,
		Path:         req.URL.Path,
		Identity:     req.Identity,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…