From a072bfeb977f81ba02a9c240c951692e05695eb4 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Tue, 23 Oct 2018 11:37:00 +0200 Subject: [PATCH] improve warning message - include library name - nicer formatting --- src/class_loader.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/class_loader.cpp b/src/class_loader.cpp index 87f98166..e2068a35 100644 --- a/src/class_loader.cpp +++ b/src/class_loader.cpp @@ -114,12 +114,11 @@ int ClassLoader::unloadLibraryInternal(bool lock_plugin_ref_count) } if (plugin_ref_count_ > 0) { - CONSOLE_BRIDGE_logWarn("%s", - "class_loader.ClassLoader: " - "SEVERE WARNING!!! Attempting to unload library while objects created by this loader " - "exist in the heap! " - "You should delete your objects before attempting to unload the library or " - "destroying the ClassLoader. The library will NOT be unloaded."); + CONSOLE_BRIDGE_logWarn("class_loader.ClassLoader: SEVERE WARNING!!!\n" + "Attempting to unload %s\n" + "while objects created by this library still exist in the heap!\n" + "You should delete your objects before destroying the ClassLoader. " + "The library will NOT be unloaded.", library_path_.c_str()); } else { load_ref_count_ = load_ref_count_ - 1; if (0 == load_ref_count_) {