diff --git a/generator/addresses_collector.cpp b/generator/addresses_collector.cpp index 6355278e9..f7855aad2 100644 --- a/generator/addresses_collector.cpp +++ b/generator/addresses_collector.cpp @@ -33,7 +33,7 @@ AddressesHolder::AddressInfo FromFB(FeatureBuilder const & fb) // - "addr:interpolation: No beg/end address point" = 89774 void LogWarning(std::string const & msg, uint64_t id) { - LOG(LWARNING, ("addr:interpolation: " + msg, id)); + LOG(LDEBUG, ("addr:interpolation: " + msg, id)); } } // namespace @@ -190,6 +190,8 @@ void AddressesCollector::CollectFeature(FeatureBuilder const & fb, OsmElement co void AddressesCollector::Save() { + LOG(LINFO, ("Saving addresses to", GetFilename())); + FileWriter writer(GetFilename()); for (auto const & e : m_interpolWays) @@ -215,6 +217,8 @@ void AddressesCollector::Save() rw::Write(writer, !beg->m_street.empty() ? beg->m_street : end->m_street); rw::Write(writer, !beg->m_postcode.empty() ? beg->m_postcode : end->m_postcode); } + + LOG(LINFO, ("Finished saving addresses")); } void AddressesCollector::MergeInto(AddressesCollector & collector) const diff --git a/generator/collector_boundary_postcode.cpp b/generator/collector_boundary_postcode.cpp index 5033c6fdf..d7675ef5b 100644 --- a/generator/collector_boundary_postcode.cpp +++ b/generator/collector_boundary_postcode.cpp @@ -52,6 +52,7 @@ void BoundaryPostcodeCollector::Collect(OsmElement const & el) void BoundaryPostcodeCollector::Save() { + LOG(LINFO, ("Saving postcode boundaries to", GetFilename())); std::sort(m_data.begin(), m_data.end()); FileWriter writer(GetFilename()); @@ -60,6 +61,8 @@ void BoundaryPostcodeCollector::Save() rw::WriteNonEmpty(writer, p.first); rw::WriteVectorOfPOD(writer, p.second); } + + LOG(LINFO, ("Finished saving postcode boundaries")); } void BoundaryPostcodeCollector::MergeInto(BoundaryPostcodeCollector & collector) const diff --git a/generator/collector_camera.cpp b/generator/collector_camera.cpp index a56fec5d1..23ba9d971 100644 --- a/generator/collector_camera.cpp +++ b/generator/collector_camera.cpp @@ -130,12 +130,14 @@ void CameraCollector::MergeInto(CameraCollector & collector) const void CameraCollector::Save() { - LOG(LINFO, ("Saving speed cameras to", GetFilename())); + LOG(LINFO, ("Associating speed cameras with ways...")); FillCameraInWays(); + LOG(LINFO, ("Saving speed cameras to", GetFilename())); FileWriter writer(GetFilename()); ForEachCamera([&](auto const & camera) { CameraInfo::Write(writer, camera); }); + LOG(LINFO, ("Finished saving speed cameras")); } void CameraCollector::OrderCollectedData() diff --git a/generator/collector_mini_roundabout.cpp b/generator/collector_mini_roundabout.cpp index 8b2270eb7..e1177921c 100644 --- a/generator/collector_mini_roundabout.cpp +++ b/generator/collector_mini_roundabout.cpp @@ -47,6 +47,7 @@ void MiniRoundaboutCollector::CollectFeature(FeatureBuilder const & feature, Osm void MiniRoundaboutCollector::Save() { + LOG(LINFO, ("Saving mini roundabouts to", GetFilename())); /// @todo We assign only car roads here into MiniRoundaboutInfo.m_ways. /// Should also collect other highways (like path or pedestrian) in very general case. /// https://www.openstreetmap.org/way/220672898 @@ -66,6 +67,7 @@ void MiniRoundaboutCollector::Save() if (miniRoundabout.Normalize()) WriteMiniRoundabout(writer, miniRoundabout); }); + LOG(LINFO, ("Finished saving mini roundabouts")); } void MiniRoundaboutCollector::MergeInto(MiniRoundaboutCollector & collector) const diff --git a/generator/collector_routing_city_boundaries.cpp b/generator/collector_routing_city_boundaries.cpp index e6f8be401..16ab65d2a 100644 --- a/generator/collector_routing_city_boundaries.cpp +++ b/generator/collector_routing_city_boundaries.cpp @@ -443,7 +443,9 @@ void RoutingCityBoundariesCollector::Collect(OsmElement const & elem) void RoutingCityBoundariesCollector::Save() { + LOG(LINFO, ("Saving routing city boundaries to", GetFilename())); m_builder.Save(GetFilename()); + LOG(LINFO, ("Finished saving routing city boundaries")); } void RoutingCityBoundariesCollector::MergeInto(RoutingCityBoundariesCollector & collector) const diff --git a/generator/final_processor_cities.cpp b/generator/final_processor_cities.cpp index 26fa489ca..d1d599cad 100644 --- a/generator/final_processor_cities.cpp +++ b/generator/final_processor_cities.cpp @@ -20,6 +20,8 @@ void FinalProcessorCities::Process() { using namespace feature; + LOG(LINFO, ("Processing cities...")); + std::mutex mutex; auto const & localityChecker = ftypes::IsLocalityChecker::Instance(); diff --git a/generator/final_processor_coastline.cpp b/generator/final_processor_coastline.cpp index 7a6abbb59..409fbac5b 100644 --- a/generator/final_processor_coastline.cpp +++ b/generator/final_processor_coastline.cpp @@ -22,6 +22,7 @@ void CoastlineFinalProcessor::SetCoastlinesFilenames(std::string const & geomFil void CoastlineFinalProcessor::Process() { + LOG(LINFO, ("Processing coastline...")); ForEachFeatureRawFormat( m_filename, [this](FeatureBuilder const & fb, uint64_t) { m_generator.Process(fb); }); @@ -29,7 +30,7 @@ void CoastlineFinalProcessor::Process() // Check and stop if some coasts were not merged. CHECK(m_generator.Finish(), ()); - LOG(LINFO, ("Generating coastline polygons.")); + LOG(LINFO, ("Generating coastline polygons...")); size_t totalFeatures = 0; size_t totalPoints = 0; size_t totalPolygons = 0; @@ -41,6 +42,6 @@ void CoastlineFinalProcessor::Process() totalPolygons += fb.GetPolygonsCount(); } - LOG(LINFO, ("Total features:", totalFeatures, "total polygons:", totalPolygons, "total points:", totalPoints)); + LOG(LINFO, ("Total coastline features:", totalFeatures, "total polygons:", totalPolygons, "total points:", totalPoints)); } } // namespace generator diff --git a/generator/final_processor_complex.cpp b/generator/final_processor_complex.cpp index 08b31f34b..19d16cb14 100644 --- a/generator/final_processor_complex.cpp +++ b/generator/final_processor_complex.cpp @@ -63,6 +63,8 @@ void ComplexFinalProcessor::UseBuildingPartsInfo(std::string const & filename) void ComplexFinalProcessor::Process() { + LOG(LINFO, ("Processing complex features...")); + if (!m_buildingPartsFilename.empty()) m_buildingToParts = std::make_unique(m_buildingPartsFilename); diff --git a/generator/final_processor_country.cpp b/generator/final_processor_country.cpp index 40ea56841..e35960c12 100644 --- a/generator/final_processor_country.cpp +++ b/generator/final_processor_country.cpp @@ -46,24 +46,30 @@ void CountryFinalProcessor::Process() /// @todo Make "straight-way" processing. There is no need to make many functions and /// many read-write FeatureBuilder ops here. + LOG(LINFO, ("Processing coastline...")); if (!m_coastlineGeomFilename.empty()) ProcessCoastline(); // 1. Process roundabouts and addr:interpolation first. + LOG(LINFO, ("Processing roundabouts...")); if (!m_miniRoundaboutsFilename.empty() || !m_addrInterpolFilename.empty()) ProcessRoundabouts(); // 2. Process additional addresses then. + LOG(LINFO, ("Adding addresses...")); if (!m_addressPath.empty()) AddAddresses(); + LOG(LINFO, ("Adding fake nodes...")); if (!m_fakeNodesFilename.empty()) AddFakeNodes(); + LOG(LINFO, ("Adding isolines...")); if (!m_isolinesPath.empty()) AddIsolines(); // DropProhibitedSpeedCameras(); + LOG(LINFO, ("Processing building parts...")); ProcessBuildingParts(); // Finish(); diff --git a/generator/final_processor_world.cpp b/generator/final_processor_world.cpp index 4a6916eea..e7ad01bde 100644 --- a/generator/final_processor_world.cpp +++ b/generator/final_processor_world.cpp @@ -23,11 +23,11 @@ void WorldFinalProcessor::Process() auto fbs = ReadAllDatRawFormat(m_worldTmpFilename); Order(fbs); WorldGenerator generator(m_worldTmpFilename, m_coastlineGeomFilename, m_popularPlacesFilename); - LOG(LINFO, ("Process World features")); + LOG(LINFO, ("Processing World features...")); for (auto & fb : fbs) generator.Process(fb); - LOG(LINFO, ("Merge World lines")); + LOG(LINFO, ("Merging World lines...")); generator.DoMerge(); } diff --git a/generator/metalines_builder.cpp b/generator/metalines_builder.cpp index 9bbee4795..977331b06 100644 --- a/generator/metalines_builder.cpp +++ b/generator/metalines_builder.cpp @@ -199,6 +199,8 @@ void MetalinesBuilder::Finish() void MetalinesBuilder::Save() { + LOG(LINFO, ("Saving metalines to", GetFilename())); + std::unordered_multimap> keyToLineString; FileReader reader(GetTmpFilename()); ReaderSource src(reader); @@ -223,8 +225,7 @@ void MetalinesBuilder::Save() } } - LOG_SHORT(LINFO, ("Wrote", countLines, "metalines [with", countWays, "ways] with OSM IDs for the entire planet to", - GetFilename())); + LOG(LINFO, ("Finished saving metalines. Wrote", countLines, "metalines [with", countWays, "ways]")); } void MetalinesBuilder::OrderCollectedData() diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index 09f871139..c55d358b9 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -1470,10 +1470,10 @@ void GetNameAndType(OsmElement * p, FeatureBuilderParams & params, TypesFilterFn size_t const typesCount = params.m_types.size(); if (params.FinishAddingTypesEx() == FeatureParams::TYPES_EXCEED_MAX) - LOG(LWARNING, ("Exceeded types count for:", DebugPrintID(*p), "Types:", typesCount, typesString)); + LOG(LDEBUG, ("Exceeded types count for:", DebugPrintID(*p), "Types:", typesCount, typesString)); if (!params.house.IsEmpty() && !ftypes::IsAddressObjectChecker::Instance()(params.m_types)) - LOG(LWARNING, ("Have house number for _non-address_:", DebugPrintID(*p), "Types:", typesString)); + LOG(LDEBUG, ("Have house number for _non-address_:", DebugPrintID(*p), "Types:", typesString)); } // Stage6: Collect additional information about feature such as diff --git a/generator/raw_generator.cpp b/generator/raw_generator.cpp index 3f284ad65..cf90df8dd 100644 --- a/generator/raw_generator.cpp +++ b/generator/raw_generator.cpp @@ -265,6 +265,7 @@ bool RawGenerator::GenerateFilteredFeatures() while (!isEnd); LOG(LINFO, ("OSM source input was processed.")); + LOG(LINFO, ("Finishing translators...")); if (!translators.Finish()) return false; diff --git a/generator/restriction_writer.cpp b/generator/restriction_writer.cpp index 1a982e666..93c4e1d95 100644 --- a/generator/restriction_writer.cpp +++ b/generator/restriction_writer.cpp @@ -188,6 +188,7 @@ void RestrictionWriter::Finish() void RestrictionWriter::Save() { CHECK(!m_stream.is_open(), ("Finish() has not been called.")); + LOG(LINFO, ("Saving restriction values to", GetFilename())); if (Platform::IsFileExistsByFullPath(GetTmpFilename())) CHECK(base::CopyFileX(GetTmpFilename(), GetFilename()), ()); } diff --git a/generator/road_access_generator.cpp b/generator/road_access_generator.cpp index 4101d5cbf..55a91cc6e 100644 --- a/generator/road_access_generator.cpp +++ b/generator/road_access_generator.cpp @@ -453,7 +453,7 @@ void RoadAccessCollector::Save() { // Dump only bicycle profile with the most wide barriers set to ignore. if (p.m_vehicleType == VehicleType::Bicycle) - LOG(LWARNING, ("Node barrier without access:", nodeID)); + LOG(LDEBUG, ("Node barrier without access:", nodeID)); continue; } } @@ -467,6 +467,8 @@ void RoadAccessCollector::Save() }, m_cache); sizeWriter.Write(writer, count); + + LOG(LINFO, ("Finished saving road access values")); } void RoadAccessCollector::MergeInto(RoadAccessCollector & collector) const diff --git a/generator/road_penalty_generator.cpp b/generator/road_penalty_generator.cpp index 15a315ed2..ff3aafab4 100644 --- a/generator/road_penalty_generator.cpp +++ b/generator/road_penalty_generator.cpp @@ -220,6 +220,8 @@ void RoadPenaltyCollector::Save() routing::Save(writer, entry.type); } } + + LOG(LINFO, ("Finished saving road penalty values")); } bool BuildRoadPenalty(string const & dataFilePath, string const & roadPenaltyPath, diff --git a/generator/translator.cpp b/generator/translator.cpp index 2af743f39..ad337682d 100644 --- a/generator/translator.cpp +++ b/generator/translator.cpp @@ -62,9 +62,7 @@ void Translator::Emit(OsmElement const & src) void Translator::Finish() { - LOG(LINFO, ("Finishing collectors...")); m_collector->Finish(); - LOG(LINFO, ("Finishing processors...")); m_processor->Finish(); }