server : skip GH copilot requests from logging
This commit is contained in:
parent
04b5a92478
commit
65e65fd6c0
1 changed files with 20 additions and 12 deletions
|
@ -2605,7 +2605,14 @@ static json format_detokenized_response(std::string content)
|
||||||
|
|
||||||
static void log_server_request(const httplib::Request &req, const httplib::Response &res)
|
static void log_server_request(const httplib::Request &req, const httplib::Response &res)
|
||||||
{
|
{
|
||||||
LOG_INFO("request", {
|
// skip GH copilot requests when using default port
|
||||||
|
if (req.path == "/v1/health" || req.path == "/v1/completions")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_INFO("request",
|
||||||
|
{
|
||||||
{"remote_addr", req.remote_addr},
|
{"remote_addr", req.remote_addr},
|
||||||
{"remote_port", req.remote_port},
|
{"remote_port", req.remote_port},
|
||||||
{"status", res.status},
|
{"status", res.status},
|
||||||
|
@ -2614,7 +2621,8 @@ static void log_server_request(const httplib::Request &req, const httplib::Respo
|
||||||
{"params", req.params},
|
{"params", req.params},
|
||||||
});
|
});
|
||||||
|
|
||||||
LOG_VERBOSE("request", {
|
LOG_VERBOSE("request",
|
||||||
|
{
|
||||||
{"request", req.body},
|
{"request", req.body},
|
||||||
{"response", res.body},
|
{"response", res.body},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue