mirror of
https://github.com/tobiasehlert/teslamateapi.git
synced 2026-02-27 09:54:18 +08:00
changing logging slightly
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
@@ -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..",
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user