Log marshals the audit.Event to json and prints it to standard output.
(event *audit.Event)
| 56 | |
| 57 | // Log marshals the audit.Event to json and prints it to standard output. |
| 58 | func (l *logger) Log(event *audit.Event) { |
| 59 | jsonContainer := map[string]any{ |
| 60 | "grpc_audit_log": convertEvent(event), |
| 61 | } |
| 62 | jsonBytes, err := json.Marshal(jsonContainer) |
| 63 | if err != nil { |
| 64 | grpcLogger.Errorf("failed to marshal AuditEvent data to JSON: %v", err) |
| 65 | return |
| 66 | } |
| 67 | l.goLogger.Println(string(jsonBytes)) |
| 68 | } |
| 69 | |
| 70 | // loggerConfig represents the configuration for the stdout logger. |
| 71 | // It is currently empty and implements the audit.Logger interface by embedding it. |
nothing calls this directly
no test coverage detected