Don't do this:
log.Println("[INFO] Reading version: ", string(buildBytes)) } else { log.Println("[ERROR] Unable to read /opt/build_version.json file:", err) Generates too much spam
This commit is contained in:
parent
94940f66c9
commit
8a80c8a609
|
@ -28,7 +28,6 @@ package messages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
|
@ -998,9 +997,6 @@ func CreateHeader(status int, location string) MessageHeader {
|
||||||
buildBytes, err := os.ReadFile("/opt/build_version.json")
|
buildBytes, err := os.ReadFile("/opt/build_version.json")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = json.Unmarshal(buildBytes, &build)
|
err = json.Unmarshal(buildBytes, &build)
|
||||||
log.Println("[INFO] Reading version: ", string(buildBytes))
|
|
||||||
} else {
|
|
||||||
log.Println("[ERROR] Unable to read /opt/build_version.json file:", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build Message Header
|
// Build Message Header
|
||||||
|
|
Loading…
Reference in New Issue