Skip to content

Commit c57dc71

Browse files
committed
Remove extra _format() in log statements
These are not needed, because the log_*() functions already do the formatting for us.
1 parent a910b86 commit c57dc71

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

src/flex-table.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ void table_connection_t::stop(bool updateable, bool append)
376376
log_info("No indexes to create on table '{}'.", table().name());
377377
} else {
378378
for (auto const &index : table().indexes()) {
379-
log_info("Creating index on table '{}' {}..."_format(
380-
table().name(), index.columns()));
379+
log_info("Creating index on table '{}' {}...", table().name(),
380+
index.columns());
381381
auto const sql = index.create_index(
382382
qualified_name(table().schema(), table().name()));
383383
m_db_connection->exec(sql);

src/osmdata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,15 @@ class multithreaded_processor
303303
if (ids_queued < 100) {
304304
// Worker startup is quite expensive. Run the processing directly
305305
// when only few items need to be processed.
306-
log_info("Going over {} pending {}s"_format(ids_queued, type));
306+
log_info("Going over {} pending {}s", ids_queued, type);
307307

308308
for (auto const oid : list) {
309309
(m_clones[0].get()->*function)(oid);
310310
}
311311
m_clones[0]->sync();
312312
} else {
313-
log_info("Going over {} pending {}s (using {} threads)"_format(
314-
ids_queued, type, m_clones.size()));
313+
log_info("Going over {} pending {}s (using {} threads)", ids_queued,
314+
type, m_clones.size());
315315

316316
std::vector<std::future<void>> workers;
317317

src/output-flex.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,8 +1430,7 @@ output_flex_t::output_flex_t(std::shared_ptr<middle_query_t> const &mid,
14301430

14311431
log_debug("Tables:");
14321432
for (auto const &table : *m_tables) {
1433-
log_debug(
1434-
"- TABLE {}"_format(qualified_name(table.schema(), table.name())));
1433+
log_debug("- TABLE {}", qualified_name(table.schema(), table.name()));
14351434
log_debug(" - columns:");
14361435
for (auto const &column : table) {
14371436
log_debug(" - \"{}\" {} ({}) not_null={} create_only={}",
@@ -1586,8 +1585,8 @@ idset_t const &output_flex_t::get_marked_way_ids()
15861585
if (m_stage2_way_ids->empty()) {
15871586
log_info("Skipping stage 1c (no marked ways).");
15881587
} else {
1589-
log_info("Entering stage 1c processing of {} ways..."_format(
1590-
m_stage2_way_ids->size()));
1588+
log_info("Entering stage 1c processing of {} ways...",
1589+
m_stage2_way_ids->size());
15911590
m_stage2_way_ids->sort_unique();
15921591
}
15931592

@@ -1614,8 +1613,8 @@ void output_flex_t::reprocess_marked()
16141613
}
16151614
}
16161615

1617-
log_info("Creating id indexes took {}"_format(
1618-
util::human_readable_duration(timer.stop())));
1616+
log_info("Creating id indexes took {}",
1617+
util::human_readable_duration(timer.stop()));
16191618
}
16201619

16211620
lua_gc(lua_state(), LUA_GCCOLLECT, 0);
@@ -1629,8 +1628,7 @@ void output_flex_t::reprocess_marked()
16291628

16301629
m_stage2_way_ids->sort_unique();
16311630

1632-
log_info(
1633-
"There are {} ways to reprocess..."_format(m_stage2_way_ids->size()));
1631+
log_info("There are {} ways to reprocess...", m_stage2_way_ids->size());
16341632

16351633
for (osmid_t const id : *m_stage2_way_ids) {
16361634
if (!m_way_cache.init(middle(), id)) {

0 commit comments

Comments
 (0)