From 878ca02687b9cc11d308afc689fd00f4e233bd6e Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sun, 22 Oct 2023 17:52:49 -0700 Subject: [PATCH] Updating logging --- functions/src/init/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/src/init/main.go b/functions/src/init/main.go index 39cf7f4..5cf185e 100644 --- a/functions/src/init/main.go +++ b/functions/src/init/main.go @@ -17,20 +17,20 @@ func (f *Function) Handler(_ []byte) ([]byte, error) { // Fetch the airport data data, err := f.tarmac.Function.Call("fetch", []byte("")) if err != nil { - f.tarmac.Logger.Error(fmt.Sprintf("Failed to fetch airport data", err)) + f.tarmac.Logger.Error(fmt.Sprintf("Failed to fetch airport data - %s", err)) return []byte(""), fmt.Errorf("Failed to fetch airport data: %s", err) } // Parse the data parser, err := csv.New(bytes.NewReader(data)) if err != nil { - f.tarmac.Logger.Error(fmt.Sprintf("Failed to create CSV parser", err)) + f.tarmac.Logger.Error(fmt.Sprintf("Failed to create CSV parser - %s", err)) return []byte(""), fmt.Errorf("Failed to create CSV parser: %s", err) } airports, err := parser.Parse() if err != nil { - f.tarmac.Logger.Error(fmt.Sprintf("Failed to parse airport data", err)) + f.tarmac.Logger.Error(fmt.Sprintf("Failed to parse airport data - %s", err)) return []byte(""), fmt.Errorf("Failed to parse airport data: %s", err) } f.tarmac.Logger.Info(fmt.Sprintf("Fetched %d airports", len(airports)))