Removed logs from controller config file.
This commit is contained in:
		
							parent
							
								
									9c4af587df
								
							
						
					
					
						commit
						c04572f685
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -307,13 +307,13 @@ int main(int argc, char ** argv){
 | 
				
			||||||
  //close stderr to make the stderr reading thread exit
 | 
					  //close stderr to make the stderr reading thread exit
 | 
				
			||||||
  close(STDERR_FILENO);
 | 
					  close(STDERR_FILENO);
 | 
				
			||||||
  //write config
 | 
					  //write config
 | 
				
			||||||
 | 
					  tthread::lock_guard<tthread::mutex> guard(Controller::logMutex);
 | 
				
			||||||
 | 
					  Controller::Storage.removeMember("log");
 | 
				
			||||||
 | 
					  for (JSON::ObjIter it = Controller::Storage["streams"].ObjBegin(); it != Controller::Storage["streams"].ObjEnd(); it++){
 | 
				
			||||||
 | 
					    it->second.removeMember("meta");
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  if ( !Controller::WriteFile(Controller::conf.getString("configFile"), Controller::Storage.toString())){
 | 
					  if ( !Controller::WriteFile(Controller::conf.getString("configFile"), Controller::Storage.toString())){
 | 
				
			||||||
    std::cerr << "Error writing config " << Controller::conf.getString("configFile") << std::endl;
 | 
					    std::cerr << "Error writing config " << Controller::conf.getString("configFile") << std::endl;
 | 
				
			||||||
    tthread::lock_guard<tthread::mutex> guard(Controller::logMutex);
 | 
					 | 
				
			||||||
    Controller::Storage.removeMember("log");
 | 
					 | 
				
			||||||
    for (JSON::ObjIter it = Controller::Storage["streams"].ObjBegin(); it != Controller::Storage["streams"].ObjEnd(); it++){
 | 
					 | 
				
			||||||
      it->second.removeMember("meta");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    std::cerr << "**Config**" << std::endl;
 | 
					    std::cerr << "**Config**" << std::endl;
 | 
				
			||||||
    std::cerr << Controller::Storage.toString() << std::endl;
 | 
					    std::cerr << Controller::Storage.toString() << std::endl;
 | 
				
			||||||
    std::cerr << "**End config**" << std::endl;
 | 
					    std::cerr << "**End config**" << std::endl;
 | 
				
			||||||
| 
						 | 
					@ -330,3 +330,4 @@ int main(int argc, char ** argv){
 | 
				
			||||||
  /*LTS-END*/
 | 
					  /*LTS-END*/
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue