Refactor logging, improve error handling workflow, clang-format. (#3385)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "extractor/guidance/toolkit.hpp"
|
||||
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
@@ -197,9 +197,9 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in
|
||||
else if (countValid(intersection) > 0) // check whether turns exist at all
|
||||
{
|
||||
// FALLBACK, this should hopefully never be reached
|
||||
util::SimpleLogger().Write(logDEBUG)
|
||||
<< "Fallback reached from motorway, no continue angle, " << intersection.size()
|
||||
<< " roads, " << countValid(intersection) << " valid ones.";
|
||||
util::Log(logDEBUG) << "Fallback reached from motorway, no continue angle, "
|
||||
<< intersection.size() << " roads, " << countValid(intersection)
|
||||
<< " valid ones.";
|
||||
return fallback(std::move(intersection));
|
||||
}
|
||||
}
|
||||
@@ -275,7 +275,7 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in
|
||||
via_eid,
|
||||
isThroughStreet(1, intersection),
|
||||
intersection[1]);
|
||||
util::SimpleLogger().Write(logDEBUG) << "Disabled U-Turn on a freeway";
|
||||
util::Log(logDEBUG) << "Disabled U-Turn on a freeway";
|
||||
intersection[0].entry_allowed = false; // UTURN on the freeway
|
||||
}
|
||||
else if (exiting_motorways == 2)
|
||||
@@ -334,8 +334,8 @@ Intersection MotorwayHandler::fromMotorway(const EdgeID via_eid, Intersection in
|
||||
}
|
||||
else
|
||||
{
|
||||
util::SimpleLogger().Write(logDEBUG) << "Found motorway junction with more than "
|
||||
"2 exiting motorways or additional ramps";
|
||||
util::Log(logDEBUG) << "Found motorway junction with more than "
|
||||
"2 exiting motorways or additional ramps";
|
||||
return fallback(std::move(intersection));
|
||||
}
|
||||
} // done for more than one highway exit
|
||||
@@ -489,9 +489,8 @@ Intersection MotorwayHandler::fromRamp(const EdgeID via_eid, Intersection inters
|
||||
}
|
||||
else
|
||||
{ // FALLBACK, hopefully this should never been reached
|
||||
util::SimpleLogger().Write(logDEBUG) << "Reached fallback on motorway ramp with "
|
||||
<< intersection.size() << " roads and "
|
||||
<< countValid(intersection) << " valid turns.";
|
||||
util::Log(logDEBUG) << "Reached fallback on motorway ramp with " << intersection.size()
|
||||
<< " roads and " << countValid(intersection) << " valid turns.";
|
||||
return fallback(std::move(intersection));
|
||||
}
|
||||
return intersection;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/coordinate_calculation.hpp"
|
||||
#include "util/guidance/toolkit.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "extractor/guidance/turn_classification.hpp"
|
||||
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "extractor/guidance/turn_lane_augmentation.hpp"
|
||||
#include "extractor/guidance/turn_lane_types.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/assert.hpp>
|
||||
@@ -104,7 +104,7 @@ LaneDataVector augmentMultiple(const std::size_t none_index,
|
||||
}
|
||||
}
|
||||
// this should, theoretically, never be reached
|
||||
util::SimpleLogger().Write(logWARNING) << "Failed lane assignment. Reached bad situation.";
|
||||
util::Log(logWARNING) << "Failed lane assignment. Reached bad situation.";
|
||||
return std::make_pair(std::size_t{0}, std::size_t{0});
|
||||
}();
|
||||
for (auto intersection_index = range.first; intersection_index < range.second;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "extractor/guidance/turn_discovery.hpp"
|
||||
#include "extractor/guidance/turn_lane_augmentation.hpp"
|
||||
#include "extractor/guidance/turn_lane_matcher.hpp"
|
||||
#include "util/simple_logger.hpp"
|
||||
#include "util/log.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
@@ -46,8 +46,8 @@ TurnLaneHandler::TurnLaneHandler(const util::NodeBasedDynamicGraph &node_based_g
|
||||
|
||||
TurnLaneHandler::~TurnLaneHandler()
|
||||
{
|
||||
std::cout << "Handled: " << count_handled << " of " << count_called
|
||||
<< " lanes: " << (double)(count_handled * 100) / (count_called) << " %." << std::endl;
|
||||
util::Log() << "Handled: " << count_handled << " of " << count_called
|
||||
<< " lanes: " << (double)(count_handled * 100) / (count_called) << " %.";
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user