Skip to content

Commit 074a1b9

Browse files
committed
Adding some logging
1 parent 86e60df commit 074a1b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/post_handlers.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,12 @@ limhamn::http::server::response ff::try_upload_post(const limhamn::http::server:
251251
}
252252
topic_json["posts"].push_back(post_id);
253253

254+
ff::logger.write_to_log(limhamn::logger::type::notice, "Inserting post with ID: " + post_id + " into the database.\n");
255+
254256
db.exec("INSERT INTO posts (identifier, json) VALUES (?, ?)", post_id, db_json.dump());
255257

258+
ff::logger.write_to_log(limhamn::logger::type::notice, "Post with ID: " + post_id + " inserted into the database.\n");
259+
256260
ff::set_json_in_table(db, "topics", "identifier", topic_id, topic_json.dump());
257261
} catch (const std::exception& e) {
258262
nlohmann::json ret;

0 commit comments

Comments
 (0)