Files
openrouter/src/system/syslog.cpp
T
wt 6fe6a1aaf8
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Has been cancelled
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Has been cancelled
updated added classes and updated web
2025-04-24 13:56:58 +07:00

24 lines
598 B
C++

#include <system/system.hpp>
#include <types.hpp>
#include <json.hpp>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#define SYSLOG_FILE "/var/log/messages"
namespace api
{
namespace system
{
void System::get_syslog(const httplib::Request& request, httplib::Response& response)
{
std::stringstream responsedata;
std::ifstream syslogfile(SYSLOG_FILE);
responsedata << syslogfile.rdbuf();
syslogfile.close();
response.set_content(responsedata.str(), PLAIN_TEXT_TYPE);
}
}
}