changing logging slightly

This commit is contained in:
Tobias Lindberg
2021-02-18 09:45:56 +01:00
parent 35a41dc49a
commit cf15504acf
9 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -164,8 +164,8 @@ func TeslaMateAPICars() (string, bool) {
},
}
// print readable output to log
log.Println("data for /cars created:")
// print to log about request
log.Println("[TeslaMateAPICars] returned /cars data:")
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -188,8 +188,8 @@ func TeslaMateAPICarsCharges(CarID int, ResultPage int, ResultShow int) (string,
},
}
// print readable output to log
log.Printf("data for /cars/%d/charges created:", CarID)
// print to log about request
log.Printf("[TeslaMateAPICarsCharges] returned /cars/%d/charges data:", CarID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -310,8 +310,8 @@ func TeslaMateAPICarsChargesDetails(CarID int, ChargeID int) (string, bool) {
},
}
// print readable output to log
log.Printf("data for /cars/%d/charges/%d created:", CarID, ChargeID)
// print to log about request
log.Printf("[TeslaMateAPICarsChargesDetails] returned /cars/%d/charges/%d data:", CarID, ChargeID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -236,8 +236,8 @@ func TeslaMateAPICarsDrives(CarID int, ResultPage int, ResultShow int) (string,
},
}
// print readable output to log
log.Printf("data for /cars/%d/drives created:", CarID)
// print to log about request
log.Printf("[TeslaMateAPICarsDrives] returned /cars/%d/drives data:", CarID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -373,8 +373,8 @@ func TeslaMateAPICarsDrivesDetails(CarID int, DriveID int) (string, bool) {
},
}
// print readable output to log
log.Printf("data for /cars/%d/drives/%d created:", CarID, DriveID)
// print to log about request
log.Printf("[TeslaMateAPICarsDrivesDetails] returned /cars/%d/drives/%d data:", CarID, DriveID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -571,8 +571,8 @@ func TeslaMateAPICarsStatus(CarID int) (string, bool) {
},
}
// print readable output to log
log.Printf("data for /cars/%d/status created:", CarID)
// print to log about request
log.Printf("[TeslaMateAPICarsStatus] returned /cars/%d/status data:", CarID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -114,8 +114,8 @@ func TeslaMateAPICarsUpdates(CarID int, ResultPage int, ResultShow int) (string,
},
}
// print readable output to log
log.Printf("data for /cars/%d/updates created:", CarID)
// print to log about request
log.Printf("[TeslaMateAPICarsUpdates] returned /cars/%d/updates data:", CarID)
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+2 -2
View File
@@ -123,8 +123,8 @@ func TeslaMateAPIGlobalSettings() (string, bool) {
},
}
// print readable output to log
log.Println("data for /globalsettings created:")
// print to log about request
log.Println("[TeslaMateAPIGlobalSettings] returned /cars data:")
js, _ := json.Marshal(jsonData)
log.Printf("%s\n", js)
+1 -1
View File
@@ -37,7 +37,7 @@ func main() {
// root endpoint telling API is running
r.GET("/", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "API runnnig..",
"message": "TeslaMateApi runnnig..",
})
})