mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 13:11:20 -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 "SWGInstanceSummaryResponse.h"
 | 
				
			||||||
#include "SWGInstanceDevicesResponse.h"
 | 
					#include "SWGInstanceDevicesResponse.h"
 | 
				
			||||||
#include "SWGInstanceChannelsResponse.h"
 | 
					#include "SWGInstanceChannelsResponse.h"
 | 
				
			||||||
 | 
					#include "SWGLoggingInfo.h"
 | 
				
			||||||
#include "SWGErrorResponse.h"
 | 
					#include "SWGErrorResponse.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "maincore.h"
 | 
					#include "maincore.h"
 | 
				
			||||||
@ -138,6 +139,22 @@ int WebAPIAdapterSrv::instanceChannels(
 | 
				
			|||||||
    return 200;
 | 
					    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)
 | 
					void WebAPIAdapterSrv::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    deviceSetList->init();
 | 
					    deviceSetList->init();
 | 
				
			||||||
 | 
				
			|||||||
@ -50,6 +50,10 @@ public:
 | 
				
			|||||||
            SWGSDRangel::SWGInstanceChannelsResponse& response,
 | 
					            SWGSDRangel::SWGInstanceChannelsResponse& response,
 | 
				
			||||||
            SWGSDRangel::SWGErrorResponse& error);
 | 
					            SWGSDRangel::SWGErrorResponse& error);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    virtual int instanceLoggingGet(
 | 
				
			||||||
 | 
					            SWGSDRangel::SWGLoggingInfo& response,
 | 
				
			||||||
 | 
					            SWGSDRangel::SWGErrorResponse& error);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    MainCore& m_mainCore;
 | 
					    MainCore& m_mainCore;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user