mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
Server: web API: implemented /sdrangel/logging GET
This commit is contained in:
parent
8d447dc827
commit
debdae9529
@ -24,6 +24,7 @@
|
||||
#include "SWGInstanceSummaryResponse.h"
|
||||
#include "SWGInstanceDevicesResponse.h"
|
||||
#include "SWGInstanceChannelsResponse.h"
|
||||
#include "SWGLoggingInfo.h"
|
||||
#include "SWGErrorResponse.h"
|
||||
|
||||
#include "maincore.h"
|
||||
@ -138,6 +139,22 @@ int WebAPIAdapterSrv::instanceChannels(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int WebAPIAdapterSrv::instanceLoggingGet(
|
||||
SWGSDRangel::SWGLoggingInfo& response,
|
||||
SWGSDRangel::SWGErrorResponse& error __attribute__((unused)))
|
||||
{
|
||||
response.setDumpToFile(m_mainCore.m_logger->getUseFileLogger() ? 1 : 0);
|
||||
|
||||
if (response.getDumpToFile()) {
|
||||
m_mainCore.m_logger->getLogFileName(*response.getFileName());
|
||||
m_mainCore.m_logger->getFileMinMessageLevelStr(*response.getFileLevel());
|
||||
}
|
||||
|
||||
m_mainCore.m_logger->getConsoleMinMessageLevelStr(*response.getConsoleLevel());
|
||||
|
||||
return 200;
|
||||
}
|
||||
|
||||
void WebAPIAdapterSrv::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList)
|
||||
{
|
||||
deviceSetList->init();
|
||||
|
@ -50,6 +50,10 @@ public:
|
||||
SWGSDRangel::SWGInstanceChannelsResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error);
|
||||
|
||||
virtual int instanceLoggingGet(
|
||||
SWGSDRangel::SWGLoggingInfo& response,
|
||||
SWGSDRangel::SWGErrorResponse& error);
|
||||
|
||||
private:
|
||||
MainCore& m_mainCore;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user