added location info into the log_parsing output. Now when the access logs are parsed, the geo_data is now included in the p_logs print function for each entry.

This commit is contained in:
rapturate
2026-06-08 14:25:11 -04:00
parent 1a129a5999
commit bdaf8451a0
6 changed files with 41 additions and 18 deletions

View File

@@ -12,6 +12,14 @@
#pragma once
#include <string>
struct loc_data {
std::string country;
std::string subdivision;
std::string city;
std::string latitutde;
std::string longitude;
};
/**
* @brief Loads configuration keys from a local environment file.
*
@@ -33,6 +41,6 @@ void load_env_file(const std::string& env_path = ".env");
* @brief Takes in a pointer to an ip address string and looks up the geolocation data via Maxmind DB (local)
* @note Users must alter the `.env` file to specify their own local file path for the `DB_PATH` variable pointing to the MaxMind MMDB database.
*
* @return std::string
* @return loc_data
*/
std::string iplookup(const std::string&);
loc_data iplookup(const std::string&);