somewhat working ebpf bpftrace

This commit is contained in:
Harshavardhan Musanalli
2025-11-08 20:42:07 +01:00
parent 190e54dd38
commit 794111cb44
16 changed files with 2834 additions and 216 deletions

View File

@@ -6,6 +6,8 @@ import (
"path/filepath"
"strings"
"nannyagentv2/internal/logging"
"github.com/joho/godotenv"
)
@@ -39,9 +41,9 @@ func LoadConfig() (*Config, error) {
envFile := findEnvFile()
if envFile != "" {
if err := godotenv.Load(envFile); err != nil {
fmt.Printf("Warning: Could not load .env file from %s: %v\n", envFile, err)
logging.Warning("Could not load .env file from %s: %v", envFile, err)
} else {
fmt.Printf("Loaded configuration from %s\n", envFile)
logging.Info("Loaded configuration from %s", envFile)
}
}
@@ -124,8 +126,8 @@ func (c *Config) PrintConfig() {
return
}
fmt.Println("Configuration:")
fmt.Printf(" Supabase Project URL: %s\n", c.SupabaseProjectURL)
fmt.Printf(" Metrics Interval: %d seconds\n", c.MetricsInterval)
fmt.Printf(" Debug: %v\n", c.Debug)
logging.Debug("Configuration:")
logging.Debug(" Supabase Project URL: %s", c.SupabaseProjectURL)
logging.Debug(" Metrics Interval: %d seconds", c.MetricsInterval)
logging.Debug(" Debug: %v", c.Debug)
}