From c8c957b6bc205455e597fec25673acebbe74e371 Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Tue, 3 Dec 2024 19:52:48 +0000 Subject: [PATCH] Add logging function to C++ builder --- src/lib-cpp/include/Velopack.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib-cpp/include/Velopack.hpp b/src/lib-cpp/include/Velopack.hpp index 4872fe29..84096a82 100644 --- a/src/lib-cpp/include/Velopack.hpp +++ b/src/lib-cpp/include/Velopack.hpp @@ -229,6 +229,14 @@ public: return VelopackApp(); }; + /** + * Attach a custom callback to receive log messages from Velopack. + */ + VelopackApp& SetLogger(vpkc_log_callback_t cbInstall, void* p_user_data) { + vpkc_set_logger(cbInstall, p_user_data); + return *this; + }; + /** * Set whether to automatically apply downloaded updates on startup. This is ON by default. */