Skip to content

Commit

Permalink
Print size of database / count of removed rows only in debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Oct 10, 2024
1 parent e558f79 commit c4b5b80
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/database/database-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ static bool delete_old_queries_in_DB(sqlite3 *db)
// Get how many rows have been affected (deleted)
const int affected = sqlite3_changes(db);

// Print final message only if there is a difference
if((config.debug.database.v.b) || affected)
log_info("Size of %s is %.2f MB, deleted %i rows",
config.files.database.v.s, 1e-6*get_FTL_db_filesize(), affected);
// Print debug message
log_debug(DEBUG_DATABASE, "Size of %s is %.2f MB, deleted %i rows",
config.files.database.v.s, 1e-6*get_FTL_db_filesize(), affected);

return true;
}
Expand Down

0 comments on commit c4b5b80

Please sign in to comment.