mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-29 02:42:51 +00:00
add debug log
This commit is contained in:
parent
f13165feea
commit
5ea900ff48
1 changed files with 10 additions and 0 deletions
|
|
@ -2495,6 +2495,16 @@ func (s *InboundService) syncWithSlaves(method string, path string, contentType
|
|||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
logger.Debugf("Request URL: %s", req.URL.String())
|
||||
if req.Body != nil {
|
||||
bodyBytes, err := io.ReadAll(req.Body)
|
||||
if err != nil {
|
||||
logger.Warningf("Failed to read request body: %v", err)
|
||||
} else {
|
||||
logger.Debugf("Request body: %s", string(bodyBytes))
|
||||
}
|
||||
}
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
bodyBytes, _ := io.ReadAll(resp.Body)
|
||||
logger.Warningf("Failed to sync with server %s. Status: %s, Body: %s", server.Name, resp.Status, string(bodyBytes))
|
||||
|
|
|
|||
Loading…
Reference in a new issue