adapt tool to output logs with new mechanism
This commit is contained in:
parent
088393ca12
commit
f57519b909
@ -20,6 +20,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
|
|
||||||
|
|
||||||
#include "../Library/OSRM.h"
|
#include "../Library/OSRM.h"
|
||||||
|
#include "../Util/SimpleLogger.h"
|
||||||
|
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
@ -44,6 +45,8 @@ void print_tree(boost::property_tree::ptree const& pt, const unsigned recursion_
|
|||||||
|
|
||||||
|
|
||||||
int main (int argc, char * argv[]) {
|
int main (int argc, char * argv[]) {
|
||||||
|
LogPolicy::GetInstance().Unmute();
|
||||||
|
try {
|
||||||
std::cout << "\n starting up engines, compile at "
|
std::cout << "\n starting up engines, compile at "
|
||||||
<< __DATE__ << ", " __TIME__ << std::endl;
|
<< __DATE__ << ", " __TIME__ << std::endl;
|
||||||
IniFile serverConfig((argc > 1 ? argv[1] : "server.ini"));
|
IniFile serverConfig((argc > 1 ? argv[1] : "server.ini"));
|
||||||
@ -62,8 +65,8 @@ int main (int argc, char * argv[]) {
|
|||||||
route_parameters.language = ""; //unused atm
|
route_parameters.language = ""; //unused atm
|
||||||
//route_parameters.hints.push_back(); // see wiki, saves I/O if done properly
|
//route_parameters.hints.push_back(); // see wiki, saves I/O if done properly
|
||||||
|
|
||||||
_Coordinate start_coordinate(52.519930*1000000,13.438640*1000000);
|
_Coordinate start_coordinate(52.519930*COORDINATE_PRECISION,13.438640*COORDINATE_PRECISION);
|
||||||
_Coordinate target_coordinate(52.513191*1000000,13.415852*1000000);
|
_Coordinate target_coordinate(52.513191*COORDINATE_PRECISION,13.415852*COORDINATE_PRECISION);
|
||||||
route_parameters.coordinates.push_back(start_coordinate);
|
route_parameters.coordinates.push_back(start_coordinate);
|
||||||
route_parameters.coordinates.push_back(target_coordinate);
|
route_parameters.coordinates.push_back(target_coordinate);
|
||||||
|
|
||||||
@ -82,5 +85,9 @@ int main (int argc, char * argv[]) {
|
|||||||
boost::property_tree::read_json(ss, pt);
|
boost::property_tree::read_json(ss, pt);
|
||||||
|
|
||||||
print_tree(pt, 0);
|
print_tree(pt, 0);
|
||||||
|
} catch (std::exception & e) {
|
||||||
|
SimpleLogger().Write(logWARNING) << "caught exception: " << e.what();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user