updated added classes and updated web
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
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
This commit is contained in:
1 parent
cba48908e4
commit
6fe6a1aaf8
50 files changed
+440
-435
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user