41 lines
652 B
C++
41 lines
652 B
C++
#ifndef LOGGER_H
|
|
#define LOGGER_H
|
|
|
|
// Custom includes
|
|
|
|
class NetLogger {
|
|
public:
|
|
struct Server{
|
|
int priority;
|
|
char* url[]; // Put the url at the end for bit optimization
|
|
};
|
|
|
|
void initNetLogger(Server server);
|
|
|
|
void logNet(char* body[], char* head, Server server);
|
|
|
|
void logNetAsync(); // Todo
|
|
private:
|
|
|
|
|
|
};
|
|
|
|
#endif // End of header
|
|
|
|
|
|
#ifdef LOGGER_IMPL
|
|
#ifndef LOGGER_IMPL_H
|
|
#define LOGGER_IMPL_H
|
|
// Implementation
|
|
|
|
// Includes
|
|
#include <httplib.h> // Todo : add it in the flake
|
|
|
|
void NetLogger::initNetLogger(Server server) {
|
|
httplib::Client cli(server.url)
|
|
// Todo : add error handling
|
|
}
|
|
|
|
#endif
|
|
#endif
|