add error log
This commit is contained in:
parent
58746ebdfb
commit
72187f348b
2 changed files with 6 additions and 3 deletions
|
|
@ -143,7 +143,7 @@ func LoadCountrySettingsWithPermissions() []CountryNamePerms {
|
||||||
// read file country.settings.json
|
// read file country.settings.json
|
||||||
content, err := os.Open("country.settings.json")
|
content, err := os.Open("country.settings.json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("country.settings.json not found")
|
fmt.Println(fmt.Errorf("country.settings.json not found"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// read content to json
|
// read content to json
|
||||||
|
|
@ -151,7 +151,7 @@ func LoadCountrySettingsWithPermissions() []CountryNamePerms {
|
||||||
err = json.NewDecoder(content).Decode(&countrySettings)
|
err = json.NewDecoder(content).Decode(&countrySettings)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("error in country.settings")
|
fmt.Println(fmt.Errorf("error in country.settings"))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -788,7 +788,10 @@ func (rr *RecipeRouter) getImageOfProductCode(w http.ResponseWriter, r *http.Req
|
||||||
clean1 := strings.Replace(recipe.UriData, "\u003d", "=", -1)
|
clean1 := strings.Replace(recipe.UriData, "\u003d", "=", -1)
|
||||||
uriName := strings.Split(clean1, "=")[1]
|
uriName := strings.Split(clean1, "=")[1]
|
||||||
|
|
||||||
img_dir := "taobin_project/image/page_drink_picture2_n/"
|
// img_dir := "taobin_project/image/page_drink_picture2_n/"
|
||||||
|
|
||||||
|
// new img dir
|
||||||
|
img_dir := "cofffeemachineConfig/" + countryID + "/.img/"
|
||||||
|
|
||||||
fullPath := img_dir + uriName
|
fullPath := img_dir + uriName
|
||||||
rr.taoLogger.Log.Debug("RecipeRouter.getImageOfProductCode", zap.Any("fullPath", fullPath))
|
rr.taoLogger.Log.Debug("RecipeRouter.getImageOfProductCode", zap.Any("fullPath", fullPath))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue