# Logging & Monitoring Audit - 20251123-080459 == Logging Libraries Used == /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:9: "log" /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:99: log.Fatal("Database configuration missing: DB_HOST, DB_USER, DB_PASSWORD, DB_NAME required") /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:109: log.Fatalf("Invalid DB_SCHEMA '%s'. Must be: dev, testing, prod, or empty for public", dbSchema) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:119: log.Fatal(err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:123: log.Fatal(err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:130: log.Printf("Connected to database (SSL mode: %s, schema: %s)", dbSSLMode, schemaInfo) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:187: log.Fatal("Failed to create tables:", err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:190: log.Println("Database tables initialized") /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:196: log.Fatal("JWT_SECRET must be set and at least 32 characters") /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:451: log.Println("Database error:", err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:466: log.Println("Scan error:", err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:478: log.Println("Rows error:", err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:587: log.Println("Database error:", err) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:599: log.Printf("AUDIT: User %d created question %d", userID, q.ID) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:643: log.Printf("AUDIT: User %d updated question %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:680: log.Printf("AUDIT: User %d deleted question %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:748: log.Printf("AUDIT: User %d answered question %d", userID, questionID) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:792: log.Printf("AUDIT: User %d updated answer %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:832: log.Printf("AUDIT: User %d deleted answer %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:878: log.Printf("AUDIT: User %d accepted answer %d for question %d", userID, id, questionID) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:903: log.Printf("AUDIT: Admin %d verified answer %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1036: log.Printf("AUDIT: Admin %d closed question %d", userID, id) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1152: log.Printf("Forum service starting on port %s\n", port) /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1154: log.Fatal(err) /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:10: "log" /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:92: log.Println("Stripe integration enabled") /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:94: log.Println("Warning: STRIPE_SECRET_KEY not set, Stripe functionality disabled") /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:131: log.Println("Payment Service listening on :8080") /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:132: log.Fatal(server.ListenAndServe()) /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:144: log.Fatal("Database configuration missing: DB_USER, DB_PASSWORD, DB_NAME, DB_HOST required") == Health Check Endpoints == /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:934: // Check if user already voted /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:988: // Check if user already voted /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1141: // Health check /home/administrator/projects/coppertone.tech/backend/functions/forum-service/main.go:1142: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main_test.go:9:func TestHealthCheck(t *testing.T) { /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main_test.go:10: req, err := http.NewRequest("GET", "/healthz", nil) /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:116: // Health check (public) /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:117: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/payment-service/main.go:563: http.Error(w, "Invoice number already exists", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main_test.go:9:func TestHealthCheck(t *testing.T) { /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main_test.go:10: req, err := http.NewRequest("GET", "/healthz", nil) /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:109: // Health check (public) /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:110: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1090: http.Error(w, "Work order number already exists", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1140: http.Error(w, "Work order number already exists", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/work-management-service/main.go:1351: http.Error(w, "Cannot cancel a request that has already been processed", http.StatusBadRequest) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:205: // Health check /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:206: http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:430: http.Error(w, "Email already registered", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:556: http.Error(w, "Blockchain address already registered", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:727: http.Error(w, "Identity already linked", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:752: http.Error(w, "Identity already linked", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1390: // Check if user already has this role /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1398: http.Error(w, fmt.Sprintf("User already has %s role", req.Role), http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1476: // Check if user already has SUPERUSER role /home/administrator/projects/coppertone.tech/backend/functions/auth-service/main.go:1484: http.Error(w, "User is already a SUPERUSER", http.StatusConflict) /home/administrator/projects/coppertone.tech/backend/functions/example-function/main.go:50: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:33:// HealthResponse for health check /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:34:type HealthResponse struct { /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:54: mux.HandleFunc("/health", healthHandler) /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:143:func healthHandler(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:144: response := HealthResponse{ /home/administrator/projects/coppertone.tech/backend/functions/ipfs-service/main.go:145: Status: "healthy", /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:23: StatusApproved = "APPROVED" // Approved by admin, ready to publish /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:213: // Ignore errors for columns that already exist /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:214: if !strings.Contains(err.Error(), "already exists") { /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:665: respondError(w, http.StatusConflict, "Blog with this slug already exists") /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1133: respondError(w, http.StatusConflict, "A community blog with this slug already exists") /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1345: respondError(w, http.StatusBadRequest, "This blog is already a site blog") /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1446: respondError(w, http.StatusBadRequest, "This is not a community blog (SITE blogs are already verified by default)") /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1451: respondError(w, http.StatusBadRequest, "This community blog is already verified") /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1732: // Health check /home/administrator/projects/coppertone.tech/backend/functions/blog-service/main.go:1733: http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:56: mux.HandleFunc("/health", corsMiddleware(healthHandler)) /home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:202:func healthHandler(w http.ResponseWriter, r *http.Request) { /home/administrator/projects/coppertone.tech/backend/functions/contact-service/main.go:204: json.NewEncoder(w).Encode(map[string]string{"status": "healthy"}) == Metrics Endpoints == /home/administrator/projects/coppertone.tech/frontend/node_modules/.pnpm/chrome-launcher@0.15.2/node_modules/chrome-launcher/.github/workflows/lh-smoke.yml:41: run: yarn --cwd node_modules/lighthouse/ smoke --debug -j=2 --retries=0 --shard=${{ matrix.smoke-test-shard }}/2 dbw oopif offline lantern metrics == Tracing Implementation == /home/administrator/projects/coppertone.tech/.gopath/pkg/mod/golang.org/x/crypto@v0.30.0/internal/testenv/testenv_unix.go:14:// Send SIGQUIT to get a stack trace.