adding verbose init messages
This commit is contained in:
parent
8f477a0c79
commit
ac105cbf0d
@ -201,8 +201,9 @@ func tmpltTPlinkPost(w http.ResponseWriter, r *http.Request) {
|
||||
err := json.NewDecoder(r.Body).Decode(&payload)
|
||||
if err != nil {
|
||||
log.Printf("[INFO] Unable to parse payload from API call: %v\n", err)
|
||||
log.Printf("[INFO] Data received: %#v\n", payload)
|
||||
tmpltError(w, http.StatusInternalServerError, fmt.Sprintf("Unable to read info from device: %v\n", err))
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("[TRACE] Data received: %#v\n", payload)
|
||||
}
|
@ -92,5 +92,13 @@ func initialize() {
|
||||
setLogLevel(config.LogLevel)
|
||||
log.SetOutput(config.Log)
|
||||
|
||||
// print current configuration
|
||||
log.Printf("[DEBUG] configuration value set: LOG_LEVEL = %v\n", strconv.Itoa(config.LogLevel))
|
||||
log.Printf("[DEBUG] configuration value set: HTTP_PORT = %v\n", strconv.Itoa(config.WebSrvPort))
|
||||
log.Printf("[DEBUG] configuration value set: HTTP_IP = %v\n", config.WebSrvIP)
|
||||
log.Printf("[DEBUG] configuration value set: HTTP_IDLE_TIMEOUT = %v\n", strconv.Itoa(config.WebSrvIdleTimeout))
|
||||
log.Printf("[DEBUG] configuration value set: HTTP_READ_TIMEOUT = %v\n", strconv.Itoa(config.WebSrvReadTimeout))
|
||||
log.Printf("[DEBUG] configuration value set: HTTP_WRITE_TIMEOUT = %v\n", strconv.Itoa(config.WebSrvWriteTimeout))
|
||||
|
||||
log.Printf("[DEBUG] Initialization complete.")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user