(runDir string)
| 776 | } |
| 777 | |
| 778 | func findAPIProxyEventsFile(runDir string) string { |
| 779 | primary := filepath.Join(runDir, "sandbox", "firewall", "logs", proxyEventsJSONLPath) |
| 780 | if fileutil.FileExists(primary) { |
| 781 | return primary |
| 782 | } |
| 783 | |
| 784 | entries, err := os.ReadDir(runDir) |
| 785 | if err != nil { |
| 786 | return "" |
| 787 | } |
| 788 | |
| 789 | for _, entry := range entries { |
| 790 | if !entry.IsDir() { |
| 791 | continue |
| 792 | } |
| 793 | name := entry.Name() |
| 794 | if strings.HasPrefix(name, "firewall-audit-logs") || strings.HasPrefix(name, "firewall-logs") { |
| 795 | candidate := filepath.Join(runDir, name, proxyEventsJSONLPath) |
| 796 | if fileutil.FileExists(candidate) { |
| 797 | return candidate |
| 798 | } |
| 799 | } |
| 800 | } |
| 801 | |
| 802 | return "" |
| 803 | } |
| 804 | |
| 805 | // proxyEventsEntry is a JSONL record from api-proxy-logs/events.jsonl. |
| 806 | // The event name appears under one of four field names depending on the proxy version; |
no test coverage detected