mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* Zone sidecar work * Process management work * Merge * Sidecar work * API config option * Request proxy work * Proxy headers and params * Change port * Remove code * Sim work * Sidecar work * Update loot_simulator_controller.cpp * Update loot_simulator_controller.cpp * Formatting * Post merge change * Windows compile fix * Update sidecar_api.cpp * Update strings.cpp
19 lines
466 B
C++
19 lines
466 B
C++
void SidecarApi::RequestLogHandler(const httplib::Request &req, const httplib::Response &res)
|
|
{
|
|
if (!req.path.empty()) {
|
|
std::vector<std::string> params;
|
|
for (auto &p: req.params) {
|
|
params.emplace_back(fmt::format("{}={}", p.first, p.second));
|
|
}
|
|
|
|
LogInfo(
|
|
"[API] Request [{}] [{}{}] via [{}:{}]",
|
|
res.status,
|
|
req.path,
|
|
(!params.empty() ? "?" + Strings::Join(params, "&") : ""),
|
|
req.remote_addr,
|
|
req.remote_port
|
|
);
|
|
}
|
|
}
|