# HG changeset patch
# User Sebastien Jodogne <s.jodogne@gmail.com>
# Date 1616066668 -3600
# Node ID 7335efde0d2314cf00033c3a0b84b6601d7127f1
# Parent  a57ca58c538a149bd4b51a13224d2dcd39ce3242
simplification

diff -r a57ca58c538a -r 7335efde0d23 Framework/Plugins/OrthancCppDatabasePlugin.h
--- a/Framework/Plugins/OrthancCppDatabasePlugin.h	Thu Jan 28 16:54:51 2021 +0100
+++ b/Framework/Plugins/OrthancCppDatabasePlugin.h	Thu Mar 18 12:24:28 2021 +0100
@@ -55,7 +55,7 @@
   }                                                               \
   catch (...)                                                     \
   {                                                               \
-    backend->GetOutput().LogError("Native exception");            \
+    OrthancPluginLogError(backend->GetOutput().GetContext(), "Native exception"); \
     return OrthancPluginErrorCode_DatabasePlugin;                 \
   }
 
@@ -110,21 +110,6 @@
       return context_;
     }
 
-    void LogError(const std::string& message)
-    {
-      OrthancPluginLogError(context_, message.c_str());
-    }
-
-    void LogWarning(const std::string& message)
-    {
-      OrthancPluginLogWarning(context_, message.c_str());
-    }
-
-    void LogInfo(const std::string& message)
-    {
-      OrthancPluginLogInfo(context_, message.c_str());
-    }
-
     void SignalDeletedAttachment(const std::string& uuid,
                                  int32_t            contentType,
                                  uint64_t           uncompressedSize,
@@ -577,7 +562,8 @@
     static void LogError(IDatabaseBackend* backend,
                          const std::runtime_error& e)
     {
-      backend->GetOutput().LogError("Exception in database back-end: " + std::string(e.what()));
+      const std::string message = "Exception in database back-end: " + std::string(e.what());
+      OrthancPluginLogError(backend->GetOutput().GetContext(), message.c_str());
     }