Commit cacc58dbb88ef5ea891ea1835099b288c86b8135
1 parent
82382f2c
Exists in
master
注释debug日志
Showing
2 changed files
with
13 additions
and
15 deletions
Show diff stats
src/HttpServer/logic/bytedance.go
@@ -13,7 +13,6 @@ import ( | @@ -13,7 +13,6 @@ import ( | ||
13 | "encoding/json" | 13 | "encoding/json" |
14 | "errors" | 14 | "errors" |
15 | "io/ioutil" | 15 | "io/ioutil" |
16 | - "log" | ||
17 | "net/http" | 16 | "net/http" |
18 | ) | 17 | ) |
19 | 18 | ||
@@ -33,8 +32,8 @@ func CreateBytedanceSign(session_key string, post_body []byte) string { | @@ -33,8 +32,8 @@ func CreateBytedanceSign(session_key string, post_body []byte) string { | ||
33 | hashcode2 := hex.EncodeToString(h.Sum(nil)) | 32 | hashcode2 := hex.EncodeToString(h.Sum(nil)) |
34 | 33 | ||
35 | //logtest | 34 | //logtest |
36 | - log.Println("CreateBytedanceSign::,session_key:", session_key, ",post_body:", string(post_body), ",hashcode2:", hashcode2) | ||
37 | - //logtest | 35 | + //log.Println("CreateBytedanceSign::,session_key:", session_key, ",post_body:", string(post_body), ",hashcode2:", hashcode2) |
36 | + //logtest、 | ||
38 | 37 | ||
39 | return hashcode2 | 38 | return hashcode2 |
40 | } | 39 | } |
@@ -78,11 +77,11 @@ func GetBytedanceGlobalID(access_token, openid string) (globalid int64, err erro | @@ -78,11 +77,11 @@ func GetBytedanceGlobalID(access_token, openid string) (globalid int64, err erro | ||
78 | return | 77 | return |
79 | } | 78 | } |
80 | 79 | ||
81 | - log.Println("GetBytedanceGlobalID::", string(result)) | 80 | + //log.Println("GetBytedanceGlobalID::", string(result)) |
82 | 81 | ||
83 | globalid = tmp.GlobalID | 82 | globalid = tmp.GlobalID |
84 | 83 | ||
85 | - log.Println("globalid::", globalid) | 84 | + //log.Println("globalid::", globalid) |
86 | 85 | ||
87 | return | 86 | return |
88 | 87 |
src/HttpServer/logic/function.go
@@ -11,7 +11,6 @@ import ( | @@ -11,7 +11,6 @@ import ( | ||
11 | "errors" | 11 | "errors" |
12 | "github.com/astaxie/beego/httplib" | 12 | "github.com/astaxie/beego/httplib" |
13 | "io/ioutil" | 13 | "io/ioutil" |
14 | - "log" | ||
15 | "net/http" | 14 | "net/http" |
16 | "strconv" | 15 | "strconv" |
17 | "time" | 16 | "time" |
@@ -339,8 +338,8 @@ func BeegoHttpPost(url string, reqdata AddcointotoutiaoReq) (string, error) { | @@ -339,8 +338,8 @@ func BeegoHttpPost(url string, reqdata AddcointotoutiaoReq) (string, error) { | ||
339 | req := httplib.Post(url) | 338 | req := httplib.Post(url) |
340 | req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true}) | 339 | req.SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true}) |
341 | //logtest | 340 | //logtest |
342 | - req.Header("x-tt-env", "ppe_signature_test") | ||
343 | - req.Header("X-USE-PPE", "1") | 341 | + //req.Header("x-tt-env", "ppe_signature_test") |
342 | + //req.Header("X-USE-PPE", "1") | ||
344 | //logtest | 343 | //logtest |
345 | req.JSONBody(&reqdata) | 344 | req.JSONBody(&reqdata) |
346 | 345 | ||
@@ -351,13 +350,13 @@ func BeegoHttpPost(url string, reqdata AddcointotoutiaoReq) (string, error) { | @@ -351,13 +350,13 @@ func BeegoHttpPost(url string, reqdata AddcointotoutiaoReq) (string, error) { | ||
351 | } | 350 | } |
352 | 351 | ||
353 | //logtest | 352 | //logtest |
354 | - rep, _ := req.Response() | ||
355 | - logid := rep.Header.Get("x-tt-logid") | ||
356 | - log.Println("logid::", logid) | ||
357 | - log.Println("url::", url) | ||
358 | - log.Println("header::", "ppe_add_signature--1") | ||
359 | - log.Println("result::", string(result)) | ||
360 | - log.Println("reqdata::", reqdata) | 353 | + //rep, _ := req.Response() |
354 | + //logid := rep.Header.Get("x-tt-logid") | ||
355 | + //log.Println("logid::", logid) | ||
356 | + //log.Println("url::", url) | ||
357 | + //log.Println("header::", "ppe_add_signature--1") | ||
358 | + //log.Println("result::", string(result)) | ||
359 | + //log.Println("reqdata::", reqdata) | ||
361 | //logtest | 360 | //logtest |
362 | 361 | ||
363 | return string(result), nil | 362 | return string(result), nil |